durusmail: quixote-users: prefix ending up in URL with SCGI
prefix ending up in URL with SCGI
2003-01-25
2003-01-27
prefix ending up in URL with SCGI
Michael Watkins
2003-01-25
When a URL to an object isn't terminated properly with a /, under SCGI the
following occurs:

http://someurl/admin

gets redirected to

http://someurl/site/admin/

This doesn't happen when run with the CGI driver

What triggered me to look at this was noticing this behaviour when using
the option_select widget.

I have a form which uses an option_select widget to reload (re render) a
form onchange().

The first visit to the form results in a HTTP GET to the correct path:

User sees: http://someurl/admin/content/376/content

Browser request: "GET /admin/content/376/content HTTP/1.0" 200 7053
"http://someurl/admin/content/376/edit"


Choosing another option from the option_select widget results in a post,
but adds the SCGI prefix ("site" in this case) into the post argument.

User sees: http://someurl/site/admin/content/376/content

Browser request: "POST /site/admin/content/376/content HTTP/1.0" 200 5768
"http://someurl/admin/content/376/content"

My SCGI configuration looks as follows:
httpd.conf:



     SCGIServer 127.0.0.1 4000
     SCGIHandler On
     Allow from all


.htaccess
RewriteCond %{REQUEST_URI}
!^.*\.(gif|jpg|css|wav|avi|mpg|pdf|txt|html|js|swf)$ [NC]
RewriteCond %{REQUEST_URI} !^.*site.*$ [NC]
RewriteRule ^(.*)$  /site/$1 [L]


This behaviour is not noted when running in either my Windows or *nix CGI
test / dev environments - only SCGI.

I turned FIX_TRAILING_SLASHES off which predictably causes the simple
missing / example to raise the appropriate error.

But, the onchange submit() in used by an option_select widget still "works"
but inserts the /site prefix in the URL.

Any thoughts?


reply