Issue Details (XML | Word | Printable)

Key: MODPYTHON-105
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Unassigned
Reporter: Graham Dumpleton
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
mod_python

mod_python.publisher should not discard content for HEAD request.

Created: 02/Jan/06 01:09 PM   Updated: 05/Mar/06 03:01 PM
Return to search
Component/s: publisher
Affects Version/s: 3.2.7
Fix Version/s: 3.2.7

Time Tracking:
Not Specified

Resolution Date: 11/Jan/06 09:14 AM


 Description  « Hide
In addressing MODPYTHON-71, mod_python.publisher code was changed to read:

        if req.method!='HEAD':
            req.write(result)

This change should not really have been made and it should be changed back to what was there before, ie., just:

        req.write(result)

This is because even when HEAD is used, any output is sent through any output filters before Apache finally decides to throw it away. That mod_python.publisher is not allowing the data through, may cause issues for any output filters that are doing something with the output and expect it all to be there.

As an an example of an Apache module that uses output filters to do stuff, there is mod_cache. Luckily in that case, a HEAD request is one of various cases where mod_cache decides it will not use the output. This does not mean though that some other output filter that someone is using might expect content to be there for HEAD.

In summary, one could also say that if a user wants to not output anything for a HEAD request, that is there decision, but mod_python.publisher should not be making that decision for them.

Because HEAD didn't work before 3.2 anyway, it is possibly not essential that this issue be fixed before 3.2 release, but if other changes need to be made, it probably should.

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Jim Gallacher made changes - 11/Jan/06 09:14 AM
Field Original Value New Value
Status Open [ 1 ] Resolved [ 5 ]
Resolution Fixed [ 1 ]
Fix Version/s 3.2 [ 11060 ]
Graham Dumpleton made changes - 05/Mar/06 03:01 PM
Status Resolved [ 5 ] Closed [ 6 ]