On May 29, 3:59 am, juantar <[email protected]> wrote:
> I am getting aSTREAMEDerror when trying to read the InputStream from
> a POSTed HttpServletRequest. It worked perfectly in 1.3, but it is not
> working in 1.5. The following is the code:
>
> public void doPost(HttpServletRequest request, HttpServletResponse
> response)
>                         throws IOException {
>                 String posted_data = "";
>                 //read all the contents of the posted data into a string
>                 final char[] buffer = new char[0x10000];
>                 StringBuilder posted_data_builder = new StringBuilder();
>                 BufferedReader in=request.getReader();
>
>                 int d;
>             while((d=in.read()) != -1){
>                 posted_data_builder.append((char)d);
>             }
>
>                 posted_data = posted_data_builder.toString();
>
> }
>
> Am I doing something wrong, or is this a bug?
>
> Thank you

To clarify my situation, request.getReader() throws a
java.lang.IllegalStateException (with message "STREAMED"), while
request.getInputStream() returns the InputStream, but an empty one
(inputStream.read() returns -1). Reverting back to 1.4.3 fixes the
problem.

Oh, and when uploading to production, everything seems to work. I will
have to do with 1.4.3 for now.

Regards,
Markus

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" 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/google-appengine-java?hl=en.

Reply via email to