Opened 17 years ago

Closed 17 years ago

#5414 closed (invalid)

urlopen from within Django with url to same server fails

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

Description

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.

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

http://localhost:8000/billing/pay/

The XML is built by a different view:

http://localhost:8000/billing/XML2/

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

Change History (1)

comment:1 by Jan Rademaker, 17 years ago

Resolution: invalid
Status: newclosed

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