[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] Failure to conform to CGI standards ???



On Sun, 3 Dec 2000, Michael D. Schleif wrote:

> cobalt'ers ==>
> 
> Please, notice that following four (4) URL's demonstrate a serious
> problem with the configuration of one of Tera-Byte's servers:
> 
> 	#1 <http://www.helices.org/~helices/tmp/test5.pl>
> 	#2 <http://www.helices.org/~helices/tmp/test5.pl?tmp=pictures>
> 	#3 <http://www.helices.org/~helices/tmp/test5.pl/tmp/pictures>
> 	#4
> <http://www.helices.org/~helices/tmp/test5.pl/tmp/pictures?tmp=pictures>

well, in theory only #2 is a valud cgi call...

> Notice that _6.1.6. PATH_INFO_ states:
> 
> ``The PATH_INFO string is the trailing part of the <path> component of
> the Script-URI (see section 3.2) that follows the SCRIPT_NAME portion of
> the path.''
> 
> ``Servers MUST make this URI component available to CGI scripts.''

ONLY when using scriptalias...otherwise it's meaningless

> 
> 
> Notice, also, that _6.1.7. _PATH_TRANSLATED_ states:
> 
> ``PATH_TRANSLATED is derived by taking any path-info component of the
> request URI (see section 6.1.6), decoding it (see section 3.1), parsing
> it as a URI in its own right, and performing any virtual-to-physical
> translation appropriate to map it onto the server's document repository
> structure.''
> 

now you get to the broken part..

> 
> We wonder, what is the purpose of this section:
> 
> RewriteEngine on
> RewriteCond %{HTTP_HOST}                !^216.234.189.108(:80)?$
> RewriteCond %{HTTP_HOST}                !^www.helices.org(:80)?$
> RewriteRule ^/(.*)                      http://www.helices.org/$1 [L,R]
> RewriteOptions inherit

no, this just fixes up the domain name if someone forgot the www part or
used a IP address...

> What would happen, if this section was *not* present ???

some cgi's would be slightly confused about the hostname, nothing much
else ( i have done this on purpose on occasion)

The thing that is biting you is this:

AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site99/users/$1/web/$3

Because user directories are handled as an alias , the path is not
reversible by the server and several things break, includig mod_rewrite
functionality for .htaccess for users and PATH info for cgi's

Doing the above using rewrite instead of the alias odule might fix it, tho
i admit i have never tried it...

> 
> Or, another thing to try would be to combine these:
>         RewriteCond %{HTTP_HOST}                !^216.234.189.108(:80)?$
>         RewriteCond %{HTTP_HOST}                !^www.helices.org(:80)?$
> to:
>         RewriteCond %{HTTP_HOST}               
> !^(216.234.189.108(:80)?|www.helices.org(:80)?)$

this is not quite equivilant.., the above rules make 2 passes in case the
domain name needs to be fixed up after the IP address is fixed up, but
this has nothing to do with it anyhow...

> 
> Tera-Byte responds:
> 
> ``we use standard cobalt raq servers and their configuration if your not
> satisfied with this current configuration  you can either contact cobalt
> networks about getting it changed (we cant change it)or you may exersice
> your 30 day money back guarantee''
> 
> What do you think?

I think they fact they even answered your email puts them in at least the
the 20% of hosting companies from what i have been seeing lately ;0

The question is do you want to fiddle and void the (largely
useless)[imho] software warrenty....