You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@shiro.apache.org by Rob W <di...@yahoo.com> on 2015/07/23 00:40:27 UTC
Anonymous POST with DefaultWebSessionManager
I am using Shiro 1.2.3 with Jersey 2.x. I am using Forms authentication with DefaultWebSessionManager, since I need to handle both, REST and HTML.
Occasionally I need to handle POSTed form data (application/x-www-form-urlencoded) submitted by anonymous users. These forms can have a lot of fields, so I would like to get the form data as a MultivaluedMap. However when I try it, I get the warning:
A servlet request to the URI http://... contains form parameters in the request body but the request body has been consumed by the servlet or a servlet filter accessing the request parameters.
This error goes away if there is a session cookie, so I assume the DefaultWebSessionManager is consuming the POST params. Is this correct, and if so is there a session manager I can use that doesn't do that, or workaround other than using @FormParam?
Re: Anonymous POST with DefaultWebSessionManager
Posted by Rob W <di...@yahoo.com>.
As a follow-up to this: I ended up just extending DefaultWebSessionManager and overriding the offending methods, to make it simply not check for a session ID parameter. So far this doesn't seem to have any undesired side-effects for me.