no param in production server

75 views
Skip to first unread message

Alexandre Russel

unread,
Feb 3, 2013, 8:38:20 AM2/3/13
to lif...@googlegroups.com
Hi all,

I'm having a strange problem, I'm running the exact same code on
locally and on the production server. In both case I run it with
-Drun.mode=production. I send the exact same request to local and
remote (I've checked it with wireshark). And to debug, I've added:
LiftRules.onBeginServicing.append {
case r => println("Received: " + r._params)
}

on localhost, I have all the param I've sent:
Received: Map(oauth_body_hash -> List(2jmj7l5rSw0yVb/vlWAYkK/YBwk=),
oauth_signature_method -> List(HMAC-SHA1), oauth_signature ->
List(wvMOpqErmS8s609sWEZppeZgMg0=), oauth_consumer_key ->
List(WK89hntD4gbtJEGTnLZ2iGn2fxNeRMSvC0UgKrJvp0), oauth_version ->
List(1.0), oauth_token -> List(), oauth_timestamp -> List(1359897985),
oauth_nonce -> List(30107478)

on the production server I've got:
Received: Map()

Any ideas how I could debug further this issue ? The production server
is an aws ubuntu ami and I call tomcat 7 directly (no nginx or
apache). I also have some page that do ajax call to the prod server,
and in this cases, the param are pass correctly.

Alex

Diego Medina

unread,
Feb 3, 2013, 9:03:06 AM2/3/13
to Lift
no idea why but:

1- do you also use the same tomcat version locally?
2- how do you send these parameters? curl?
3- do you get parameters to other snippets?

Regards,

Diego
> --
> --
> Lift, the simply functional web framework: http://liftweb.net
> Code: http://github.com/lift
> Discussion: http://groups.google.com/group/liftweb
> Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
>
> ---
> You received this message because you are subscribed to the Google Groups "Lift" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>



--
Diego Medina
Lift/Scala Developer
di...@fmpwizard.com
http://fmpwizard.telegr.am

Alexandre Russel

unread,
Feb 3, 2013, 1:41:27 PM2/3/13
to lif...@googlegroups.com
On Sun, Feb 3, 2013 at 3:03 PM, Diego Medina <di...@fmpwizard.com> wrote:
> no idea why but:
>
> 1- do you also use the same tomcat version locally?

thanks for the hint, so now I'm at:
I'm sending a request using python restkit with oauth doing a put with
x-www-form-urlencoded param. When I start jetty with container:start,
Req.params shows all the param of the form. When I package and deploy
to tomcat 7 (locally), the exact same request show an Empty Map for
Req.params

Alexandre Russel

unread,
Feb 3, 2013, 3:31:25 PM2/3/13
to lif...@googlegroups.com
just in case someone has the same problem:
https://issues.apache.org/bugzilla/show_bug.cgi?id=48692
Provide an option to treat application/x-www-form-urlencoded encoded
parameters in a PUT request in a similar manner to
application/x-www-form-urlencoded parameters in a POST request

Alexandre Russel

unread,
Feb 3, 2013, 3:37:02 PM2/3/13
to lif...@googlegroups.com
a bit more info here:
http://tomcat.apache.org/tomcat-7.0-doc/config/http.html
with the specific config:

parseBodyMethods
A comma-separated list of HTTP methods for which request bodies will
be parsed for request parameters identically to POST. This is useful
in RESTful applications that want to support POST-style semantics for
PUT requests. Note that any setting other than POST causes Tomcat to
behave in a way that goes against the intent of the servlet
specification. The HTTP method TRACE is specifically forbidden here in
accordance with the HTTP specification. The default is POST

Kevin Lau

unread,
Feb 3, 2013, 4:55:12 PM2/3/13
to lif...@googlegroups.com
Probably you have identified the problem. If the problem persists, is it possible to run the project probably in ElasticBeanStalk (EBS) in development mode and/or production mode?

Richard Dallaway

unread,
Feb 5, 2013, 5:02:56 PM2/5/13
to liftweb

Did you change this setting and get the result you wanted?

--
Sent from my phone, so may be terse.

Alexandre Russel

unread,
Feb 5, 2013, 11:24:13 PM2/5/13
to lif...@googlegroups.com
On Tue, Feb 5, 2013 at 11:02 PM, Richard Dallaway <ric...@dallaway.com> wrote:
> Did you change this setting and get the result you wanted?

yes, this was not related to lift at all, just tomcat that doesn't
return param on request.getParameters for any request other than POST
by default.

Richard Dallaway

unread,
Feb 6, 2013, 6:11:07 AM2/6/13
to lif...@googlegroups.com
Great. To capture these discoveries I've created a page on the wiki: User Guide / Deployment / Tomcat : https://www.assembla.com/spaces/liftweb/wiki/Tomcat

Feel free to edit if I've not got it right.
Reply all
Reply to author
Forward
0 new messages