jetty-9 reverted isHead change

This commit is contained in:
Greg Wilkins 2012-08-27 11:14:19 +10:00
parent cb5dd493fb
commit 353978726b
4 changed files with 7 additions and 6 deletions

View File

@ -136,7 +136,7 @@ public class Request implements HttpServletRequest
private boolean _handled = false;
private int _inputState = __NONE;
private HttpMethod _httpMethod;
private String _method;
private String _httpMethodString;
private MultiMap<String> _parameters;
private boolean _paramsExtracted;
private String _pathInfo;
@ -674,7 +674,7 @@ public class Request implements HttpServletRequest
@Override
public String getMethod()
{
return _method;
return _httpMethodString;
}
/* ------------------------------------------------------------ */
@ -1417,7 +1417,7 @@ public class Request implements HttpServletRequest
_cookiesExtracted = false;
_context = null;
_serverName = null;
_method = null;
_httpMethodString = null;
_pathInfo = null;
_port = 0;
_httpVersion = HttpVersion.HTTP_1_1;
@ -1676,13 +1676,13 @@ public class Request implements HttpServletRequest
public void setMethod(HttpMethod httpMethod, String method)
{
_httpMethod=httpMethod;
_method = method;
_httpMethodString = method;
}
/* ------------------------------------------------------------ */
public boolean isHead()
{
return HttpMethod.HEAD==HttpMethod.fromString(_method);
return HttpMethod.HEAD==_httpMethod;
}
/* ------------------------------------------------------------ */

View File

@ -172,7 +172,6 @@ public class DispatcherTest
_contextHandler.addServlet(ForwardServlet.class, "/ForwardServlet/*");
_contextHandler.addServlet(AssertIncludeForwardServlet.class, "/AssertIncludeForwardServlet/*");
String expected=
"HTTP/1.1 200 OK\r\n"+
"Content-Length: 0\r\n"+

View File

@ -31,6 +31,7 @@ import org.eclipse.jetty.websocket.api.WebSocketAdapter;
import org.eclipse.jetty.websocket.api.WebSocketConnection;
import org.junit.Assert;
import static org.hamcrest.Matchers.greaterThanOrEqualTo;
import static org.hamcrest.Matchers.is;
/**

View File

@ -45,6 +45,7 @@ import org.junit.Test;
import org.junit.runner.RunWith;
import static org.hamcrest.Matchers.greaterThan;
import static org.hamcrest.Matchers.lessThanOrEqualTo;
import static org.hamcrest.Matchers.is;
import static org.hamcrest.Matchers.notNullValue;