Opened 8 years ago

Closed 8 years ago

#5414 closed (invalid)

urlopen from within Django with url to same server fails

Reported by: bjorn.ruud@… Owned by: nobody
Component: runserver Version: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


As the title says, urllib{2}.urlopen(URL) hangs if it is run from within a Django app and URL is a view on the same Django server. Other URLs works as intended. This has only been tested on Windows XP Pro with the built-in web server, using python 2.5 and Django SVN.

The following URL has a corresponding pay() function, which uses a class that loads a dynamically built XML:


The XML is built by a different view:


Within pay() the XML URL is opened using urllib2.urlopen(URL), where execution hangs.

Change History (1)

comment:1 Changed 8 years ago by janr

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

The built-in server can only handle one request at a time, therefore, the second request has to wait for the first to finish, while the first request waits for urlopen to finish.

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