Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Gregory (Grisha) Trubetskoy
I guess the fundamental problem here now that I think about it is that such a Host header based determination relies on trusting the client of what the host should be, which, if you think about it isn't a good programming practice. For example, if Apache is configured such that it just answe

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Daniel J. Popowich
Gregory (Grisha) Trubetskoy writes: > I think a properly designed site should insist on its host name, i.e. "I > see you think I'm gobbledygook.bleh, but I'm going to redirect you to > http://www.modpython.org/ because that is my true name". This is very > common with sites that respond to both

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jorey Bump
Daniel J. Popowich wrote: Now if I type the following into a telnet session (telnet localhost 8000): GET http://foo:[EMAIL PROTECTED]:8000/~dpopowich/py/parsed?a=b&c=d#here HTTP/1.1 Authorization: Basic Zm9vOmJhcg== Host: localhost:8000 Then the output is: req.hostname: local

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jorey Bump
Daniel J. Popowich wrote: As I said in my previous email to the list, I *think* if you use virtual hosts and your "real" sites are NOT the first real host, then you are forcing clients to speak HTTP/1.1, thus forcing the Host header to be sent. This is technically false. A better way to put

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jorey Bump
Jim Gallacher wrote: Gregory (Grisha) Trubetskoy wrote: I don't know what the specific issue is with parsed_uri, if this is a mod_python bug it should just be fixed BUT if this is an issue with httpd, I don't think we should cover the problem up by having mod_python "fix" it. Since we are pa

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Daniel J. Popowich
Jorey Bump writes: > > o req.hostname is set by the contents of the full URI, or in absence > >of a full uri, the value of the Host header (this is what is > >actually said in the mod_python docs). As mentioned before, in the > >case when HTTP/1.1 AND the full URI are not specified, r

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jorey Bump
Gregory (Grisha) Trubetskoy wrote: Perhaps we can add something to the docs that says "this attribute gets its data from the argument to the HTTP GET method, which is usually just the path in the URL and does not include the protocol, hostname and port. It is only filled in completely when the

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jim Gallacher
Jorey Bump wrote: Jim Gallacher wrote: Gregory (Grisha) Trubetskoy wrote: I don't know what the specific issue is with parsed_uri, if this is a mod_python bug it should just be fixed BUT if this is an issue with httpd, I don't think we should cover the problem up by having mod_python "fix

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jorey Bump
Jim Gallacher wrote: I still think it would be useful to have a tuple similar to parsed_uri, but which is fully populated. Not sure if it's possible: Developer: STOP! He who would use the Killer App must answer me these questions three, 'ere my precious data he see: What is your request?

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Daniel J. Popowich
Jim Gallacher writes: > Daniel J. Popowich wrote: > > Jim Gallacher writes: > > > >>Jim Gallacher wrote: > >> > >> > >>>Using an internal_redirect messes with some of these attributes but not > >>>others. Those that change get their new values from the new_uri used in > >>>the redirect. Unchang

Re: Various musings about the request URL / URI / whatever

2005-11-30 Thread Jim Gallacher
Daniel J. Popowich wrote: Jim Gallacher writes: Daniel J. Popowich wrote: Jim Gallacher writes: Jim Gallacher wrote: Using an internal_redirect messes with some of these attributes but not others. Those that change get their new values from the new_uri used in the redirect. Unchanged