tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: [Fwd: Re: Parameters disappear from PUTs]
Date Mon, 08 Feb 2010 14:43:52 GMT
Hash: SHA1


On 2/5/2010 7:13 PM, 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: 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
> 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. 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
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message