libapreq and form parsing
Curt Sampson <[email protected]> Wed, 1 Jun 2005 10:44:14 +0900 (JST)
| Newsgroups | gmane.comp.apache.mod-ruby |
|---|---|
| Message-ID | <[email protected]> |
On Wed, 1 Jun 2005, Curt Sampson wrote: > Could this be because I'm using libapreq, and it's reading and parsing > the body? Further to this, I'll just post the issue I'm having here, and perhaps someone will have a hint. When I submit a form request to a mod-ruby script using Firefox, libapreq seems to parse it just fine, the parameters show up in Apache.request.paramtable and can also be retrieved with Apache.request.param(). However, when I submit the form using my test-httpweb testing framework (available from rubyforge), which uses Net::HTTP for the actual posting, libapreq does not seem to be able to parse the form. The request submitted by test-httpweb seems to have all the correct headers and so on. I've appended copies of the working and non-working requests; can anyone tell me what might be wrong? [firefox] POST /rbx/auto-purchase-start HTTP/1.1 Host: localhost:8084 User-Agent: Mozilla/5.0 (X11; U; NetBSD i386; en-US; rv:1.7.8) Gecko/20050513 Firefox/1.0.4 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-us,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Content-Type: application/x-www-form-urlencoded Content-Length: 67 credit_card_number=+499-273-98+716++&expiry_month=12&expiry_year=09 [no cr at end] [test-httpweb] POST /rbx/auto-purchase-start HTTP/1.1 Connection: close Accept: */* Content-Type: application/x-www-form-urlencoded Content-Length: 67 Host: localhost:8084 credit_card_number=+499-273-98+716++&expiry_month=12&expiry_year=09 [no cr at end] cjs -- Curt Sampson <[email protected]> +81 90 7737 2974 http://www.NetBSD.org Make up enjoying your city life...produced by BIC CAMERA