Received: (qmail 11697 invoked by uid 2012); 30 Dec 1998 00:31:52 -0000 Message-Id: <19981230003152.11696.qmail@hyperreal.org> Date: 30 Dec 1998 00:31:52 -0000 From: Cott Lang Reply-To: cott@internetstaff.com To: apbugs@hyperreal.org Subject: problems reading POST data w/ getReader and GetInputStream X-Send-Pr-Version: 3.2 >Number: 3607 >Category: mod_jserv >Synopsis: problems reading POST data w/ getReader and GetInputStream >Confidential: no >Severity: non-critical >Priority: medium >Responsible: jserv >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Tue Dec 29 16:40:01 PST 1998 >Closed-Date: Tue Mar 26 06:28:39 PST 2002 >Last-Modified: Tue Mar 26 06:28:39 PST 2002 >Originator: cott@internetstaff.com >Release: Apache 1.3.3 + JServ 1.0b1 >Organization: >Environment: Solaris x86 2.7, JDK 1.1.6/1.2.0 >Description: getReader() and getInputStream() both fail to return anything when used with a BufferedReader. I have used the same code with quite a few other ServletRunners - WebSphere, Zeus, ServletRunner, Java Web Server, and two versions have always worked flawlessly with BufferedReader. >How-To-Repeat: The following servlet code does not work. It causes no exceptions, ready simply does not ever return true, for either getReader() or getInputStream() if (aMethod.equals("POST")) { // This change is to work around a bug in WebSphere // BufferedReader reader = aRequest.getReader(); BufferedReader reader = new BufferedReader(new InputStreamReader(aRequest.getInputStream())); StringBuffer buf = new StringBuffer(); char[] vCharBuffer = new char[1024]; int vNumRead = 0; while (reader.ready()) { vNumRead = reader.read(vCharBuffer, 0, 1024); buf.append(vCharBuffer, 0, vNumRead); } content = buf.toString(); } >Fix: You guys no doubt no more about java streams than I do. :) >Release-Note: >Audit-Trail: State-Changed-From-To: open-feedback State-Changed-By: jon@clearink.com State-Changed-When: Sun Sep 19 15:01:57 PDT 1999 State-Changed-Why: is this still an open issue? State-Changed-From-To: feedback-closed State-Changed-By: jim State-Changed-When: Tue Mar 26 06:28:39 PST 2002 State-Changed-Why: [This is a standard response.] No response from submitter, assuming issue has been resolved. >Unformatted: [In order for any reply to be added to the PR database, ] [you need to include in the Cc line ] [and leave the subject line UNCHANGED. This is not done] [automatically because of the potential for mail loops. ] [If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request ] [from a developer. ] [Reply only with text; DO NOT SEND ATTACHMENTS! ]