Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#14501 closed (worksforme)

Django runserver + Chrome/Safari + AJAX POST quirk

Reported by: davemckenna01 Owned by: nobody
Component: Uncategorized Version: 1.1
Severity: Keywords: runserver post view ajax chrome safari
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Only with Safari and Chrome on Windows on my local machine using the django runserver, some views were randomly not returning a response to ajax POST requests. Sometimes they would, sometimes they would not.

The solution was this:

The data I was passing in to the view via POST was just one key/val pair: "action=remove". Now, I wasn't actually using this data in my view. Once I assigned the data to a var in my view, (i.e. foo = request.POSTaction?), the view would return a response to ajax requests every time.

Am I missing something - or does that seem like a crazy weird bug?

Change History (3)

comment:1 Changed 5 years ago by davemckenna01

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset

comment:2 Changed 5 years ago by gabrielhurley

  • Resolution set to worksforme
  • Status changed from new to closed

I cannot reproduce this bug. I'm using Chrome on Windows XP with Django trunk and Python 2.6.5, sending an AJAX request using jQuery's jQuery.post method, not doing anything with the data in my view, and I'm getting a response every time.

Off the top of my head possible causes for such an elusive bug might include an issue in your Python version (Python swallowing exceptions has been known to happen), or a race condition somewhere.

If you can isolate the problem any further or provide a concretely reproducible test case, feel free to re-open.

comment:3 Changed 4 years ago by jacob

  • milestone 1.3 deleted

Milestone 1.3 deleted

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