Opened 14 years ago

Closed 14 years ago

#12527 closed (invalid)

Loss of some HTTP headers

Reported by: tweksteen Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords: X-Requested-With, HTTP headers
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (2)

test.html (433 bytes ) - added by tweksteen 14 years ago.
views.py (243 bytes ) - added by tweksteen 14 years ago.

Download all attachments as: .zip

Change History (3)

by tweksteen, 14 years ago

Attachment: test.html added

by tweksteen, 14 years ago

Attachment: views.py added

comment:1 by tweksteen, 14 years ago

Resolution: invalid
Status: newclosed

I used Wireshark to capture the packet and apparently, the error is coming from jquery or firefox that
doesn't send the correct headers.

My mistake, Django has nothing to do with that.

Note: See TracTickets for help on using tickets.
Back to Top