Loss of some HTTP headers
|Reported by:||tweksteen||Owned by:||nobody|
|Severity:||Keywords:||X-Requested-With, HTTP headers|
|Has patch:||no||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
I've tried to isolate one bug I have on my blog which is that, sometimes, Django just drop some HTTP headers.
I don't really know if it is the Django fault but here is how to reproduce the bug:
- A simple view, which returns the string 'ajax' when the request is an ajax one, otherwise, 'not' is returned.
- A Jquery script that call this views each t milliseconds (the bug appears, for both t=100 and t=1000).
After a quick analyze, I think this is coming from the way Django handle the request:
- According to firebug, the header "X-Requested-With" is correctly filled but
- when I print request.meta in the view, this header has just disappears.
I don't have the knowledge to extract the raw request as soon as Django gets it, so I cannot go any further.