tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <ch...@christopherschultz.net>
Subject Re: [Fwd: Re: Parameters disappear from PUTs]
Date Mon, 08 Feb 2010 14:43:52 GMT
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Chas,

On 2/5/2010 7:13 PM, chas@munat.com wrote:
> We were discussing RFC 2616. Entity-headers and entity-body are terms
> directly from the RFC and are defined therein. No, they are not the same
> as HTTP headers, though they are contained in the HTTP headers:

To-MAY-to, to-MAH-to.

>> So, please, what is it that Tomcat is apparently hiding from your servlet?
> 
> Here are the headers for a PUT request which includes form parameters.
> They are the string immediately below the cookie information, beginning
> with "emailAddress":
> 
> http://localhost:12344/json/members/1b35d32f-714d-4393-b8c2-b4805e0c7a13
> 
> PUT /json/members/1b35d32f-714d-4393-b8c2-b4805e0c7a13 HTTP/1.1
> Host: localhost:12344
> User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US;
> rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7
> Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
> 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
> X-Requested-With: XMLHttpRequest
> Content-Type: application/x-www-form-urlencoded; charset=UTF-8
> Referer: http://localhost:12344/
> Content-Length: 297
> Cookie: JSESSIONID=dexcmg3b1r45
> emailAddress=bozo%40clown.com&title=Head%20Clown&nameGiven=Bozo&namesMiddle=The&nameFamily=Clown&namePreferred=Bozo&gender=Male&password=&passwordConfirm=&id=1b35d32f-714d-4393-b8c2-b4805e0c7a13&facebookName=bozo.the.clown&twitterName=i.am.bozo&flickrName=bozos.circus&linkedinName=mr.clown.to.you
> HTTP/1.x 201 Created
> Content-Length: 82
> Content-Type: text/plain; charset=UTF-8
> X-Lift-Version: 1.1-M4
> Server: Jetty(6.1.22)

So, a few things:

1. There is no blank line in the above request, as required by the HTTP
1.1 specification. Can you check to see where it is and show us?

2. That message looks like a POST in PUT's clothing: the Content-Type is
application/x-www-form-urlencoded and what I believe to be the body of
the request (which would be after the aforementioned blank line) is
properly encoded in that form.

3. The line beginning with emailAddress is not properly-formed HTTP header.

> As requested by a previous poster, I used Wireshark to examine the packets
> as they arrived at the server and indeed the form parameters were included
> in the packets.

...as part of the body, not as part of the headers, it looks like.

> I also added a Request Dumper Valve to Tomcat and parsed the logs to find
> the content of the Request. The HTTP headers were there, minus the line
> with the parameters.

I find that behavior in line with my reading of the request you sent:
the data (starting with "emailAddress") ought to be in the request body,
not in the message headers.

> I can find no justification in RFC 2616 for stripping
> this line out -- it is part of the entity-headers as mentioned above, and
> the RFC also discusses transparency, stating that headers not included in
> the standard list should be passed through. On a POST request, which is
> virtually identical to the above, they appear in the request dump.

As headers? Or as request parameters?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktwIygACgkQ9CaO5/Lv0PChjACfcG5E2425pA+H6T4DPxn4v5H3
+fMAoIJs4mctd5I4EYKdSnzOBmvEcvqC
=9uBN
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message