Author: remy.maucherat(a)jboss.com
Date: 2010-11-23 04:34:25 -0500 (Tue, 23 Nov 2010)
New Revision: 1581
Modified:
trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
trunk/webapps/docs/changelog.xml
Log:
- 49779: Interaction between continue and FORM.
Modified: trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java
===================================================================
--- trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2010-11-23
09:27:56 UTC (rev 1580)
+++ trunk/java/org/apache/catalina/authenticator/FormAuthenticator.java 2010-11-23
09:34:25 UTC (rev 1581)
@@ -243,8 +243,9 @@
return (false);
}
- // Yes -- Validate the specified credentials and redirect
- // to the error page if they are not correct
+ // Yes -- Acknowledge the request, validate the specified credentials
+ // and redirect to the error page if they are not correct
+ request.getResponse().sendAcknowledgement();
Realm realm = context.getRealm();
if (characterEncoding != null) {
request.setCharacterEncoding(characterEncoding);
@@ -440,6 +441,13 @@
request.getCoyoteRequest().getParameters().setQueryStringEncoding(request.getConnector().getURIEncoding());
+ // Swallow any request body since we will be replacing it
+ byte[] buffer = new byte[4096];
+ InputStream is = request.getInputStream();
+ while (is.read(buffer) >= 0) {
+ // Ignore request body
+ }
+
if ("POST".equalsIgnoreCase(saved.getMethod())) {
ByteChunk body = saved.getBody();
@@ -516,6 +524,8 @@
}
if ("POST".equalsIgnoreCase(request.getMethod())) {
+ // May need to acknowledge a 100-continue expectation
+ request.getResponse().sendAcknowledgement();
ByteChunk body = new ByteChunk();
body.setLimit(request.getConnector().getMaxSavePostSize());
Modified: trunk/webapps/docs/changelog.xml
===================================================================
--- trunk/webapps/docs/changelog.xml 2010-11-23 09:27:56 UTC (rev 1580)
+++ trunk/webapps/docs/changelog.xml 2010-11-23 09:34:25 UTC (rev 1581)
@@ -28,6 +28,9 @@
<fix>
Improve session id creation. (remm)
</fix>
+ <fix>
+ <bug>49779</bug>: Interaction between continue and FORM. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Jasper">