Re: htdig: htdig problem II


Gilles Detillieux (grdetil@scrc.umanitoba.ca)
Fri, 4 Dec 1998 15:26:08 -0600 (CST)


According to Majeau, Benoit:
>
> I know I may look like a rookie but what is the difference between "POST"
> and "GET"?
>

Basically, GET is the main method by which your browser requests information
from an HTTP server. E.g., to load a web page like

        http://www.scrc.umanitoba.ca/search.html

your browser would connect to port 80 on www.scrc.umanitoba.ca, and send
the request:

        GET /search.html HTTP/1.0

followed by some other header lines. If the search form uses the GET
method, then when you press the submit button (i.e. "Search" button),
your browser sends this request:

        GET /cgi-bin/htsearch?config=htdig&restrict=&exclude=&method=and&format=builtin-long&words=my+search+keywords HTTP/1.0

But if the search form uses the POST method, your browser would use:

        POST /cgi-bin/htsearch

and all of the query string (config=...) would follow separately, after the
other headers. POST is more appropriate if the form may contain a lot of
input, or input you don't want in the HTTP server logs or browser's URL
window (e.g. passwords). I use the GET method for htsearch, because I like
having the search requests in the server logs, so I can get summaries of them
without having to do separate search logging.

Depending on how one's HTTP server is configured (or misconfigured),
it may handle GET and POST differently, and impose restrictions on POST.
Check your server settings if you want to use POST, and can't.

If you want to know more about how HTTP GET requests are put together, you
may want to have a look at Document::RetrieveHTTP() in htdig/Document.cc.

-- 
Gilles R. Detillieux              E-mail: <grdetil@scrc.umanitoba.ca>
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
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
htdig-request@sdsu.edu containing the single word "unsubscribe" in
the body of the message.



This archive was generated by hypermail 2.0b3 on Sat Jan 02 1999 - 16:29:48 PST