Code

Opened 7 years ago

Closed 7 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: master
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

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.

Attachments (0)

Change History (1)

comment:1 Changed 7 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.

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.