orangle / django-webproxy

Automatically exported from code.google.com/p/django-webproxy
0 stars 0 forks source link

Exception Value: unknown url type: #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Change the settings.py on:

WEB_PROXY_DOMAIN = 'code.google.com'
WEB_PROXY_PORT = 80

2. Launch wsgi server: 

python manage.py runserver

3. Navigate to this page:

http://localhost:8000/p/django-webproxy/issues/list

What is the expected output? What do you see instead?
It should show exactly the same as 
http://code.google.com/p/django-webproxy/issues/list. Instead of correct page, 
it shows django page as :

"Exception Value: unknown url type: /p/django-webproxy/issues/list". 

What version of the product are you using? On what operating system?
Django 1.3. Ubuntu LTS 10.04

Please provide any additional information below.

Original issue reported on code.google.com by ming.hs...@accedo.tv on 4 May 2011 at 3:12

GoogleCodeExporter commented 9 years ago
Hi,

in proxy/middleware.py just add this lines:

...

import settings

try:
    url = "http://" + settings.WEB_PROXY_DOMAIN
except:
    url = ""

...

before line:

requ = urllib2.Request(url+querystring, None, outgoing_headers)

i think it's line 36 (cca)

Bye

Original comment by matu...@gmail.com on 12 Jul 2011 at 12:12