Agreed - based on the code, its a systemic issue with Tomcat rather than the proxy. Consider swapping to another container if that is a viable option...
Cheers, Tim On 5 Feb 2010, at 19:04, Ross Mellgren wrote: > Looking at the tomcat code, it seems pretty likely this is a Tomcat-specific > issue. > > -Ross > > On Feb 5, 2010, at 2:01 PM, Naftoli Gugenheim wrote: > >> If "any other proxy" includes nginx, then a lot of people! >> >> ------------------------------------- >> chas<[email protected]> wrote: >> >> CRUD. Yes. Exactly what I'm trying to do, and Tomcat developers are making >> it difficult. >> >> I can say that in Jetty 6, they are definitely passed. I don't know >> whether they are being stripped in Tomcat deliberately (I hope not) or if >> it's a bug. I plan to file a bug report anyway. >> >> I'm running Jetty directly (inside Maven), but my Tomcat container is >> proxied via Apache 2, so it's remotely possible that Apache is stripping >> the params out of the headers. But I doubt it. Still, if someone has Jetty >> behind an Apache proxy (or any other proxy), it would be nice to know... >> >> Chas. >> >> >>> Crud. >>> >>> Can someone do a survey of how other JVM web frameworks handle the PUT >>> inconsistencies on different containers? >>> >>> On Fri, Feb 5, 2010 at 9:29 AM, Ross Mellgren <[email protected]> wrote: >>> >>>> Looking at the Tomcat code, this is explicit. From >>>> org.apache.catalina.connector.Request: >>>> >>>> /** >>>> * Parse request parameters. >>>> */ >>>> protected void parseParameters() { >>>> ... >>>> if (!getMethod().equalsIgnoreCase("POST")) >>>> return; >>>> ... >>>> } >>>> >>>> -Ross >>>> >>>> On Feb 5, 2010, at 11:47 AM, Leo Lännenmäki wrote: >>>> >>>>> Hmpf. I have got the Tomcat PUT problem also. >>>>> >>>>> def statefulDispatchTable: LiftRules.DispatchPF = { >>>>> ... >>>>> case r...@req(List("api", "foo"), "", PutRequest) => () => >>>>> update(req) >>>>> ... >>>>> } >>>>> >>>>> def update(req: Req): LiftResponse = { >>>>> for (name <- req.paramNames) { >>>>> Log.info(name) >>>>> Log.info(req.param(name).openOr("empty")) >>>>> } >>>>> ... >>>>> } >>>>> >>>>> >>>>> On Jetty: >>>>> 209467 [736850...@qtp-566947760-0] INFO lift - param >>>>> 209467 [736850...@qtp-566947760-0] INFO lift - value >>>>> 209476 [736850...@qtp-566947760-0] INFO lift - Service request >>>>> (PUT) /api/foo took 17 Milliseconds >>>>> >>>>> curl -v -X PUT -d "param=value" -b JSESSIONID=v7a6qye5zusv >>>>> http://localhost:8080/api/foo >>>>> * About to connect() to localhost port 8080 (#0) >>>>> * Trying ::1... connected >>>>> * Connected to localhost (::1) port 8080 (#0) >>>>>> PUT /api/foo HTTP/1.1 >>>>>> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 >>>> OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 >>>>>> Host: localhost:8080 >>>>>> Accept: */* >>>>>> Cookie: JSESSIONID=v7a6qye5zusv >>>>>> Content-Length: 49 >>>>>> Content-Type: application/x-www-form-urlencoded >>>>>> >>>>> < HTTP/1.1 200 OK >>>>> < Content-Length: 0 >>>>> < Content-Type: text/html; charset=utf-8 >>>>> < X-Lift-Version: 2.0-M1 >>>>> < Server: Jetty(6.1.22) >>>>> < >>>>> * Connection #0 to host localhost left intact >>>>> * Closing connection #0 >>>>> >>>>> >>>>> >>>>> On Tomcat: >>>>> 170570 [http-8080-2] INFO lift - Service request (PUT) /api/foo took >>>>> 12 Milliseconds >>>>> >>>>> curl -v -X PUT -d "param=value" -b >>>>> JSESSIONID=68EE8A10FFBC2E5383FB9FD2821CF0E1 >>>> http://localhost:8080/myserver/api/foo >>>>> * About to connect() to localhost port 8080 (#0) >>>>> * Trying ::1... connected >>>>> * Connected to localhost (::1) port 8080 (#0) >>>>>> PUT /api/foo HTTP/1.1 >>>>>> User-Agent: curl/7.19.5 (x86_64-pc-linux-gnu) libcurl/7.19.5 >>>> OpenSSL/0.9.8g zlib/1.2.3.3 libidn/1.15 >>>>>> Host: localhost:8080 >>>>>> Accept: */* >>>>>> Cookie: JSESSIONID=68EE8A10FFBC2E5383FB9FD2821CF0E1 >>>>>> Content-Length: 49 >>>>>> Content-Type: application/x-www-form-urlencoded >>>>>> >>>>> < HTTP/1.1 200 OK >>>>> < Server: Apache-Coyote/1.1 >>>>> < X-Lift-Version: 2.0-M1 >>>>> < Content-Type: text/html;charset=utf-8 >>>>> < Content-Length: 0 >>>>> < Date: Fri, 05 Feb 2010 16:28:23 GMT >>>>> < >>>>> * Connection #0 to host localhost left intact >>>>> * Closing connection #0 >>>>> >>>>> >>>>> On Feb 4, 10:47 pm, David Pollak <[email protected]> >>>>> wrote: >>>>>> Sounds to me like a Tomcat issue... I think we're relying on the >>>> container >>>>>> to parse the body correctly. >>>>>> >>>>>> >>>>>> >>>>>> On Wed, Feb 3, 2010 at 9:15 PM, <[email protected]> wrote: >>>>>>> It's POST vs. PUT. I'm using AJAX, so I can do PUTs. >>>>>> >>>>>>> The two are identical, except: >>>>>> >>>>>>> POST instead of PUT >>>>>> >>>>>>> The POST version includes: >>>>>> >>>>>>> Pragma: no-cache >>>>>>> Cache-Control: no-cache >>>>>> >>>>>>> which the PUT does not. In other words, the headers are identical >>>> except >>>>>>> for the above. >>>>>> >>>>>>> In Jetty, no problem. In Tomcat, the params are ignored. They do not >>>> show >>>>>>> up in S.params. At all. >>>>>> >>>>>>> I can't imagine that this is a Lift issue, unless Tomcat makes >>>> params >>>>>>> available differently for PUTs than for POSTs, but Jetty does not, >>>> and >>>> I'm >>>>>>> the first guy to do PUTs to Lift on Tomcat. But I've emailed the >>>> Tomcat >>>>>>> users list and we'll see if it's something simple. If not, I'll put >>>>>>> something on GitHub. >>>>>> >>>>>>> Chas. >>>>>> >>>>>>>> Is it a POST or a GET? >>>>>> >>>>>>>> On Wed, Feb 3, 2010 at 11:44 PM, <[email protected]> wrote: >>>>>> >>>>>>>>> Thanks, David. >>>>>> >>>>>>>>> That's a non-trivial exercise for me, so let me chase down another >>>> lead >>>>>>>>> at >>>>>>>>> the moment. If that proves fruitless, I'll bite the bullet and get >>>>>>>>> something up on GitHub. >>>>>> >>>>>>>>> Chas. >>>>>> >>>>>>>>>> Please put together a reproduceable example on GitHub (works in >>>> Jetty, >>>>>>>>>> doesn't work in Tomcat) and we'll look at it. >>>>>> >>>>>>>>>> On Wed, Feb 3, 2010 at 11:48 AM, <[email protected]> wrote: >>>>>> >>>>>>>>>>> I have a lift app that works perfectly when I use mvn jetty:run. >>>> Then >>>>>>>>> I >>>>>>>>>>> package it into a war and load it up in Tomcat 6 on the server, >>>> and >>>>>>>>> when >>>>>>>>>>> I >>>>>>>>>>> do, suddenly it won't work. >>>>>> >>>>>>>>>>> The issue is with the S.params. I have a form that submits via >>>> an >>>>>>>>> Ajax >>>>>>>>>>> PUT >>>>>>>>>>> request. The params are sent in the header just fine. As I said, >>>>>>>>> works >>>>>>>>>>> like a charm on Jetty. But when it gets to Tomcat, the entity is >>>>>>>>> saved >>>>>>>>>>> with blank attributes... i.e., everything worked but the >>>>>>>>>>> S.param("whatever") showed up blank. I tested this by doing >>>>>>>>>>> S.param("whatever").openOr("Phooey") and, indeed, that attribute >>>> was >>>>>>>>> set >>>>>>>>>>> to "Phooey" on the new entity. >>>>>> >>>>>>>>>>> Tomcat issue? Or am I missing something obvious? This form is >>>> running >>>>>>>>> on >>>>>>>>>>> a >>>>>>>>>>> subdomain, so that's where I'm looking now (in server.xml). >>>>>> >>>>>>>>>>> TIA, >>>>>>>>>>> Chas. >>>>>> >>>>>>>>>>> -- >>>>>>>>>>> You received this message because you are subscribed to the >>>> Google >>>>>>>>>>> Groups >>>>>>>>>>> "Lift" group. >>>>>>>>>>> To post to this group, send email to [email protected]. >>>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>>> [email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> <liftweb%[email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>> >>>>>>>>> <liftweb%[email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> <liftweb%[email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>> >>>>>>>>>>> . >>>>>>>>>>> For more options, visit this group at >>>>>>>>>>> http://groups.google.com/group/liftweb?hl=en. >>>>>> >>>>>>>>>> -- >>>>>>>>>> Lift, the simply functional web frameworkhttp://liftweb.net >>>>>>>>>> Beginning Scalahttp://www.apress.com/book/view/1430219890 >>>>>>>>>> Follow me:http://twitter.com/dpp >>>>>>>>>> Surf the harmonics >>>>>> >>>>>>>>>> -- >>>>>>>>>> You received this message because you are subscribed to the >>>> Google >>>>>>>>> Groups >>>>>>>>>> "Lift" group. >>>>>>>>>> To post to this group, send email to [email protected]. >>>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>>> [email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> <liftweb%[email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>> >>>>>>>>> . >>>>>>>>>> For more options, visit this group at >>>>>>>>>> http://groups.google.com/group/liftweb?hl=en. >>>>>> >>>>>>>>> -- >>>>>>>>> You received this message because you are subscribed to the Google >>>>>>>>> Groups >>>>>>>>> "Lift" group. >>>>>>>>> To post to this group, send email to [email protected]. >>>>>>>>> To unsubscribe from this group, send email to >>>>>>>>> [email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> <liftweb%[email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>> >>>>>>>>> . >>>>>>>>> For more options, visit this group at >>>>>>>>> http://groups.google.com/group/liftweb?hl=en. >>>>>> >>>>>>>> -- >>>>>>>> You received this message because you are subscribed to the Google >>>> Groups >>>>>>>> "Lift" group. >>>>>>>> To post to this group, send email to [email protected]. >>>>>>>> To unsubscribe from this group, send email to >>>>>>>> [email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> . >>>>>>>> For more options, visit this group at >>>>>>>> http://groups.google.com/group/liftweb?hl=en. >>>>>> >>>>>>> -- >>>>>>> You received this message because you are subscribed to the Google >>>> Groups >>>>>>> "Lift" group. >>>>>>> To post to this group, send email to [email protected]. >>>>>>> To unsubscribe from this group, send email to >>>>>>> [email protected]<liftweb%[email protected]> >>>> <liftweb%[email protected]<liftweb%[email protected]> >>>>> >>>>>>> . >>>>>>> For more options, visit this group at >>>>>>> http://groups.google.com/group/liftweb?hl=en. >>>>>> >>>>>> -- >>>>>> Lift, the simply functional web frameworkhttp://liftweb.net >>>>>> Beginning Scalahttp://www.apress.com/book/view/1430219890 >>>>>> Follow me:http://twitter.com/dpp >>>>>> Surf the harmonics >>>>> >>>>> -- >>>>> You received this message because you are subscribed to the Google >>>> Groups >>>> "Lift" group. >>>>> To post to this group, send email to [email protected]. >>>>> To unsubscribe from this group, send email to >>>> [email protected]<liftweb%[email protected]> >>>> . >>>>> For more options, visit this group at >>>> http://groups.google.com/group/liftweb?hl=en. >>>>> >>>> >>>> -- >>>> You received this message because you are subscribed to the Google >>>> Groups >>>> "Lift" group. >>>> To post to this group, send email to [email protected]. >>>> To unsubscribe from this group, send email to >>>> [email protected]<liftweb%[email protected]> >>>> . >>>> For more options, visit this group at >>>> http://groups.google.com/group/liftweb?hl=en. >>>> >>>> >>> >>> >>> -- >>> Lift, the simply functional web framework http://liftweb.net >>> Beginning Scala http://www.apress.com/book/view/1430219890 >>> Follow me: http://twitter.com/dpp >>> Surf the harmonics >>> >>> -- >>> You received this message because you are subscribed to the Google Groups >>> "Lift" group. >>> To post to this group, send email to [email protected]. >>> To unsubscribe from this group, send email to >>> [email protected]. >>> For more options, visit this group at >>> http://groups.google.com/group/liftweb?hl=en. >>> >>> >> >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Lift" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Lift" group. >> To post to this group, send email to [email protected]. >> To unsubscribe from this group, send email to >> [email protected]. >> For more options, visit this group at >> http://groups.google.com/group/liftweb?hl=en. >> > > -- > You received this message because you are subscribed to the Google Groups > "Lift" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/liftweb?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Lift" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/liftweb?hl=en.
