> Could you please be clear when you say "entity headers": do you mean > HTTP headers? I have a Tomcat 6.0.20 install right in front of me that > definitely does allow the servlet (in my case, a simple JSP that dumps > requests) to read the HTTP headers. HTTP GET parameters are also > correctly provided to the servlet.
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: 7.1 Entity Header Fields Entity-header fields define metainformation about the entity-body or, if no body is present, about the resource identified by the request. Some of this metainformation is OPTIONAL; some might be REQUIRED by portions of this specification. entity-header = Allow ; Section 14.7 | Content-Encoding ; Section 14.11 | Content-Language ; Section 14.12 | Content-Length ; Section 14.13 | Content-Location ; Section 14.14 | Content-MD5 ; Section 14.15 | Content-Range ; Section 14.16 | Content-Type ; Section 14.17 | Expires ; Section 14.21 | Last-Modified ; Section 14.29 | extension-header extension-header = message-header The extension-header mechanism allows additional entity-header fields to be defined without changing the protocol, but these fields cannot be assumed to be recognizable by the recipient. Unrecognized header fields SHOULD be ignored by the recipient and MUST be forwarded by transparent proxies. > >> example.com/persons/6cd79223-3585-4618-ab78-1c20db09c535 > > I didn't check to see if the path info is available for PUT requests. > For that, I'll have to write a separate servlet. I'm willing to write a > test if this is the behavior you are experiencing. > > 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) 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. 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 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. I may be wrong, but it seems to me that Tomcat is stripping those headers out, thus forcing me to use POST even though the correct method should be PUT for what I'm intending. Chas. > > - -chris > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.10 (MingW32) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iEYEARECAAYFAktsnUMACgkQ9CaO5/Lv0PBmaACghka+Yd/kqKmhgKcuaLRQED6q > FvQAn3/6JsutlG4NEEYf8u0sCThfO04w > =7yzW > -----END PGP SIGNATURE----- > > --------------------------------------------------------------------- > To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org > For additional commands, e-mail: users-h...@tomcat.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org