306782 Close connection when expected 100 continues is not sent
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1660 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
d994f2db2d
commit
dd2f1166ae
|
@ -2,6 +2,7 @@ jetty-7.1.0.RC1-SNAPSHOT
|
|||
+ 296650 JETTY-1198 reset idle timeout on request body chunks
|
||||
+ 291448 SessionManager has isCheckingRemoteSessionIdEncoding
|
||||
+ 297104 HTTP CONNECT does not work correct with SSL destinations
|
||||
+ 306782 Close connection when expected 100 continues is not sent
|
||||
+ 308848 Update test suite to JUnit4 - Module jetty-ajp
|
||||
+ 308861 Update test suite to JUnit4 - Module jetty-security
|
||||
+ 308868 Update test suite to JUnit4 - Module jetty-websocket
|
||||
|
|
|
@ -685,6 +685,10 @@ public class HttpConnection implements Connection
|
|||
_generator.setResponse(_response.getStatus(), _response.getReason());
|
||||
try
|
||||
{
|
||||
// If the client was expecting 100 continues, but we sent something
|
||||
// else, then we need to close the connection
|
||||
if (_expect100Continue && _response.getStatus()!=100)
|
||||
_generator.setPersistent(false);
|
||||
_generator.completeHeader(_responseFields, last);
|
||||
}
|
||||
catch(IOException io)
|
||||
|
|
|
@ -391,6 +391,20 @@ public class RFC2616Test extends TestCase
|
|||
offset=checkContains(response,offset,"654321","8.2.3 expect 100")+1;
|
||||
*/
|
||||
|
||||
// Expect 100 not sent
|
||||
((StdErrLog)Log.getLog()).setHideStacks(true);
|
||||
offset=0;
|
||||
|
||||
response=connector.getResponses("GET /R1?error=401 HTTP/1.1\n"+
|
||||
"Host: localhost\n"+
|
||||
"Expect: 100-continue\n"+
|
||||
"Content-Type: text/plain\n"+
|
||||
"Content-Length: 8\n"+
|
||||
"\n",true);
|
||||
checkNotContained(response,offset,"HTTP/1.1 100","8.2.3 expect 100");
|
||||
offset=checkContains(response,offset,"HTTP/1.1 401 ","8.2.3 expect 100")+1;
|
||||
offset=checkContains(response,offset,"Connection: close","8.2.3 expect 100")+1;
|
||||
|
||||
((StdErrLog)Log.getLog()).setHideStacks(false);
|
||||
}
|
||||
catch (Exception e)
|
||||
|
|
Loading…
Reference in New Issue