DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ· RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=40306>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ· INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=40306 Summary: POST request bodies are not restored on successful login when using mod_jk Product: Tomcat 5 Version: 5.5.16 Platform: All OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Catalina AssignedTo: [email protected] ReportedBy: [EMAIL PROTECTED] After the FormAuthenticator intercepts a POST request to a protected resource, the original request is not properly restored upon successful login when using mod_jk. When connectiong to tomcat directly (8080), the POST request is restored as expected. I've tested this with mod_jk 1.2.15 and 1.2.18. It seems the problem is that the orginal request is not saved properly. I (think) I've narrowed down the issue in FormAuthenticator.java. body.toString() was returning null. (The buffer was null) so it looks like the root of the problem is that nothing is read from the input stream. During testing I reverted to the old way of adding the request parameters (saved.addParameter()) to see if they were indeed there and it worked. I also tried, InputStream is = new BufferedInputStream(request.getInputStream()); which didn't work.. from FormAuthenticator.java: protected void saveRequest(Request request, Session session) throws IOException { ... if ("POST".equalsIgnoreCase(request.getMethod())) { ByteChunk body = new ByteChunk(); body.setLimit(request.getConnector().getMaxSavePostSize()); byte[] buffer = new byte[4096]; int bytesRead; InputStream is = request.getInputStream(); while ( (bytesRead = is.read(buffer) ) >= 0) { body.append(buffer, 0, bytesRead); } saved.setBody(body); } ... } -- Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
