Code

Opened 4 years ago

Closed 4 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: UI/UX:

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 4 years ago.
views.py (243 bytes) - added by tweksteen 4 years ago.

Download all attachments as: .zip

Change History (3)

Changed 4 years ago by tweksteen

Changed 4 years ago by tweksteen

comment:1 Changed 4 years ago by tweksteen

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.