From: Niklas Frykholm Date: 2001-09-19T02:30:20+09:00 Subject: [ruby-talk:21345] Re: Suggestions for new CGI lib [Niklas Frykholm] > While it is true that the request method in HTTP is either POST or > GET, most servers (at least Apache) will send you both "post" and > "get" variables, in a situation like this: > >
> >
[Todd Gillespie] > Then that violates the spec. Perhaps I was not clear, I meant that you will get data both on stdin, and in ENV['QUERY_STRING']. This doesn't violate any spec that I am aware of. At least I cannot find anything in RFC 2068 saying that the abs_path in a POST-request cannot contain a query string. I think that what makes the design of a CGI library a bit tricky is that in 99 % of the cases you just want to do cgi['user'] ---> "Niklas" But then there are the remaining 1 % where you need to know whether the data came from stdin, the query string or a cookie, need to handle forms where there are multiple fields with the same name, need to handle multipart forms, etc. A good library should support both cases. // Niklas