According to Dan Langille:
> On 18 Jun 2001, at 20:55, Gilles Detillieux wrote:
> > Making htsearch generate bad URIs
>
> According to what I've read elsewhere in this thread, nobody is
> proposing bad URIs at all. The proposal is to create URIs which
> conform to the standard. A switch could easily be added so that either
> semicolons or ampersands are produced.
The URIs that htsearch creates now do conform to the standard. The HTML
4.0 standard disallows bare ampersands in URIs. It recommends using a
semicolon, which htsearch does, or SGML-encoding the ampersand as "&".
A switch to make htsearch use a bare ampersand in URIs, as it did before
3.1.5, would be a bad URI, according to the standard.
Don't confuse the HTML standard with the CGI standard. The CGI standard
covers the passing of input parameters from a client's form to the
server as an encoded query string, from the server to the CGI programs,
and finally how the CGI programs should decode this query string.
The standard separator for CGI query strings is still the ampersand,
and CGI programs must still recognise this separator, but that does
not prevent them from also recognising the semicolon separator used
in URI query strings. htsearch does this, as do most modern and
standards-conforming CGI programs, because in most cases it's a pretty
trivial matter to support both standards, despite the apparent conflict
between them.
The proposal is to modify htsearch to support legacy programs that
do not conform to both standards. This isn't a big problem if these
legacy programs only use the CGI standard, because htsearch could
be modified to use '&' instead of a semicolon or bare ampersand.
The client would decode the ampersand and send it back to the server
(and/or to the CGI program) decoded. The legacy program wouldn't need
to know the difference.
The problem is if legacy code is used to directly parse the query strings
in URIs that htsearch puts out for the page list buttons, and expects to
find bare ampersands in them. This would require configuring htsearch
to violate the HTML 4.0 standard. This isn't the end of the world, mind
you, as most web clients still allow bare ampersands in URIs anyway, but
make no mistake that this is a step backward and not a step towards
standards compliance.
> > for the sake of not having to make a
> > trivial change to your wrapper script just doesn't seem that wise to me.
>
> My understanding is that htdig does not have a php wrapper script.
> There is a guide pointing to an [outdated] article on DevShed. I used
> that to get started. From what I've been reading, everyone seems to
> create their wrapper script. If that's not true, then the rest of my post is
> not important.
No, this is pretty much bang-on. There are a couple Perl wrappers
distributed as contributed works, but no PHP code that I can recall.
And, yes, the DevShed article is rather dated and not a complete solution.
> My objective with my current php wrapper is to make something which
> is of sufficient quality that it can become the php wrapper script for
> htdig. Anyone wanting to use htdig from within php will only have to set
> a few configuration items and go use it.
>
> My thinking is: if I need it, someone else does too. And if we can get
> something which is useful to everyone on the project.
>
> For those interested in helping out, see the thread titled "completing a
> php wrapper". The work in progress can be viewed at
> http://diary.unixathome.org/htdig/results.php and the code is at
> http://diary.unixathome.org/htdig/results.php.txt
>
> The next step is to take the incoming parameters from
> $QUERY_STRING, split them, and feed them into the call to htdig.sh
> (see #2 listed below). Someone else has already posted their code to
> me and I'll be incorporating this ASAP.
>
> If anyone has suggestions for the script, don't hold back.
I believe the posted code include a string replace call to change the
semicolons back to ampersands, which means the code should handle either
query string separator. I think this is important. If you can make the
wrapper work without needing to modify htsearch 3.1.5, that's ideal.
--
Gilles R. Detillieux E-mail: <[EMAIL PROTECTED]>
Spinal Cord Research Centre WWW: http://www.scrc.umanitoba.ca/~grdetil
Dept. Physiology, U. of Manitoba Phone: (204)789-3766
Winnipeg, MB R3E 3J7 (Canada) Fax: (204)789-3930
_______________________________________________
htdig-general mailing list <[EMAIL PROTECTED]>
To unsubscribe, send a message to <[EMAIL PROTECTED]> with a
subject of unsubscribe
FAQ: http://htdig.sourceforge.net/FAQ.html