Hi,

I'm just started to play with Django, and ran into this problem right
away.

* I'm using the python script at the bottom to POST to the url.
* I'm using "manage.py runserver" to run my app
* Everything works fine when I'll run my tests with "manage.py test".

When I set a breakpoint at django/core/handlers/base.py:77 I see that
request.path_info is "http://127.0.0.1:8000/uncaughtexception/drop";.
>From what I
understand, request.path_info should be "/uncaughtexception/drop" at
that point?

Since the tests works it must be some error in my setup of runserver.
I can't understand what kind of setting I should use to make django
strip way the host
part of the URL.

   ///Kalle

-----  Traceback from 500 error page -----
Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000http://127.0.0.1:8000/uncaughtexception/drop
Django Version: 1.0.2 final SVN-11
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'boldjump.uncaughtexception']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "/Users/kalle/Documents/workspace/boldjumpweb/src/django/core/
handlers/base.py" in get_response
  77.                     request.path_info)

Exception Type: TypeError at http://127.0.0.1:8000/uncaughtexception/drop
Exception Value: 'NoneType' object is not iterable
----

--- test script ---
HOST = "127.0.0.1:8000"
URL = "http://%s/uncaughtexception/drop"; % HOST

h = httplib.HTTPConnection(HOST)
headers = { "Content-Type" : "text/html; charset=utf-8" }
h.request("POST", URL, "apa", headers)
res = h.getresponse()print res.read()
----

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to