I'm using getParts() but that prevents access to parameters via getParameter() and the
like. Whereas calling getParts() after getParameter() works fine (loadParts() doesn't
check if readStarted is true). There was no issue on WildFly 8 CR1 (Undertow 1.0.0.Beta30)
but having compared the files, the loadParts() method wasn't changed, so there
must've been something else that "pre-parsed" the form data.
Michal
----- Original Message -----
From: "Stuart Douglas" <sdouglas(a)redhat.com>
To: "Michal Petrov" <mpetrov(a)redhat.com>
Cc: undertow-dev(a)lists.jboss.org
Sent: Tuesday, March 11, 2014 1:55:01 AM
Subject: Re: [undertow-dev] Servlet request and form parameters
Its how the servlet spec says it should work. Basically if you read the
request using the ServletInputStream or the Reader, then the servlet
container can't parse data that has already been read. The servlet spec
makes it quite clear that you can either read the data yourself, or have
the container parse it for you, but not both.
Why are you handling multipart yourself anyway, and not just using
HttpServletRequest.getParts()?
Stuart
Michal Petrov wrote:
Hi,
I'm from the RichFaces team and I've run into a problem with the
HttpServletRequestImpl on WildFly 8 Final (Undertow 1.0.1.Final).
In our fileUpload component we're intercepting the request and parsing the parts to
find the uploaded files, wrapping it and passing it on. Reading the parts sets readStarted
to true and so in the Restore View phase when JSF is checking the request parameters they
are inaccessible because readStarted stops the parsing of form data. I can work around
that but I'm wondering what's the reason for preventing the parsing.
Thanks,
Michal
_______________________________________________
undertow-dev mailing list
undertow-dev(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev