<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2900.3354" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT size=2>I have used nginx 0.5.34 for some days. The backend server is
Django (run as fastcgi).</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>I want to upgrade nginx to newer version now, but I find that
all the versions after 0.5.34 seem to change something with $fastcgi_script_name
and $document_uri.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>This is some lines in my nginx.conf</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>location / {<BR> ...<BR> fastcgi_pass
127.0.0.1:10001;<BR> fastcgi_param SCRIPT_FILENAME
$document_root$fastcgi_script_name;<BR> fastcgi_param SCRIPT_NAME
$fastcgi_script_name;<BR> fastcgi_param REQUEST_URI
$request_uri;<BR> fastcgi_param DOCUMENT_URI $document_uri;<BR>
fastcgi_param DOCUMENT_ROOT $document_root;<BR> ....<BR>}</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>And the Django fastcgi process listen on
127.0.0.1:10001.<BR> <BR>A url in my app is <A
title=http://www.xxxxx.com/edit/10000/http://www.xxxxx.com/some.do
href="http://www.xxxxx.com/edit/10000/http://www.xxxxx.com/some.do">http://www.xxxxx.com/edit/10000/http://www.xxxxx.com/some.do</A>
<BR> <BR>The Django's urls.py map the url like this<BR>
<BR>(r'^edit/(?P<topicid>\d+?)/(?P<url>.+?)$',
'myapp.views.edit'),</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>So, when the usr click this url, the python program will get
two parameters: topicid=10000, url=http://www.xxxxx.com/some.do</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>It was ok when I use nginx 0.5.34. But When I use a newer
version, the param url changed to http:/www.xxxxx.com/some.do</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>I print SCRIPT_NAME and DOCUMENT_URI the Django, with 0.5.34
the result is </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>SCRIPT_NAME =
/edit/10000/http://www.xxxxx.com/some.do<BR>DOCUMENT_URI =
=/edit/10000/http://www.xxxxx.com/some.do</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>with new version the result is </FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>SCRIPT_NAME =
/edit/10000/http:/www.xxxxx.com/some.do<BR>DOCUMENT_URI =
=/edit/10000/http:/www.xxxxx.com/some.do</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>It seems the new version had remove a '/' when the url
contains '//'.</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2>Is it a bug or just a change?</FONT></DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV> </DIV>
<DIV><FONT size=2><BR></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2></FONT> </DIV></BODY></HTML>