Fixes #1878 - Handle 100 Continue response without Expect header.
Fixed accept() to test for the response code being indeed 100.
This commit is contained in:
parent
c69c7b29c7
commit
6fd3351272
|
@ -24,6 +24,7 @@ import org.eclipse.jetty.client.api.Request;
|
|||
import org.eclipse.jetty.client.api.Response;
|
||||
import org.eclipse.jetty.client.api.Result;
|
||||
import org.eclipse.jetty.client.util.BufferingResponseListener;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
|
||||
/**
|
||||
* <p>A protocol handler that handles the 100 response code.</p>
|
||||
|
@ -49,8 +50,12 @@ public class ContinueProtocolHandler implements ProtocolHandler
|
|||
@Override
|
||||
public boolean accept(Request request, Response response)
|
||||
{
|
||||
HttpConversation conversation = ((HttpRequest)request).getConversation();
|
||||
return conversation.getAttribute(ATTRIBUTE) == null;
|
||||
if (response.getStatus() == HttpStatus.CONTINUE_100)
|
||||
{
|
||||
HttpConversation conversation = ((HttpRequest)request).getConversation();
|
||||
return conversation.getAttribute(ATTRIBUTE) == null;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue