Re: several fixes

On 17.04.01 at 22:18, Bjoern Hoehrmann <derhoermi@gmx.net> wrote:

>the attached patch should deal with the following issues

Thanks! I have a few reservation about some of the details (see below), but
thanks for taking the time look into these things. More contributors are
allways welcome!

I'll see if I can get some of it in CVS tonight, but otherwise it'll have
to wait a bit. I'll be out of town (offline or on a slow-as-molasses GSM
dialup (9600baud!)) from tomorrow until late Sunday night and Gerald will
be in China for WWW10. I'll try to keep up on email if possible, but if I
can get connectivity going it'll probably be too slow to do anything
usefull.



>  * don't claim to be redirected from http://host or http://host:80/ to
>    http://host/ -> uses URI::eq()

But lack of a trailing slash _is_ a redirect!


>  * un-break /referer;ss etc. -> lets CGI.pm parse the trailing part

Hmm, this was dropped back when we first moved to CGI.pm partially to
discourage that syntax as it's indescribably ugly IMO. Wanna "think aloud"
about why you think it's a good idea?


>  * valid HTML and use of "constants" for redirect_to_home_page()

Thanks! This should have been fixed ages ago. (Brian, didn't you suggest we
fix this a while back? cf. the UNIX->NT thread?)


>  * the line
>
>      $q->param('uri', $q->param('uri') . '/')
>        unless $q->param('uri') =~ m(/);
>
>    is useless, $q->param('uri') always contains a '/' or the '/' isn't
>    needed anywhere -> deleted

http://foo.com --> http://foo.com/


>other issues
>
>  * prevent caching of /referer documents
>    -> what about using a HTTP::Headers object for the header instead of
>       a simple string?

I'm not following you here. Where do you want to use HTTP::Header, why,
how, and for what?


>  * _never_ redirect to homepage if the user requested some action like
>    http://validator.w3.org/check?uri=foo, display error message instead

Better error handling is high on my priority list, but has been deferred
until I can drop in HTML::Template (or a similar template system) to make
this less crufty.


>  * use $q->redirect for redirects

Maybe... I'll need to look into how and where we use it and what we gain
and lose by using CGI.pm. If we don't lose anything too important I'm all
for it! :-)


>  * what about using a XML validator without the limitations of nsgmls
>    to validate XML documents?

Such as? :-)


>-    Or add a "show source iff errors" option?
>+    Or add a "show source if errors" option?

Not sure this is a typo. "iff" == "if and only if"

Received on Tuesday, 17 April 2001 16:55:56 UTC