mirror of
https://github.com/jetty/jetty.project.git
synced 2025-02-28 10:59:19 +00:00
undo accidental commit
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@1399 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
40ee939b4e
commit
9cc74e8451
@ -26,7 +26,6 @@ import org.eclipse.jetty.http.HttpHeaders;
|
|||||||
import org.eclipse.jetty.http.HttpMethods;
|
import org.eclipse.jetty.http.HttpMethods;
|
||||||
import org.eclipse.jetty.http.HttpParser;
|
import org.eclipse.jetty.http.HttpParser;
|
||||||
import org.eclipse.jetty.http.HttpSchemes;
|
import org.eclipse.jetty.http.HttpSchemes;
|
||||||
import org.eclipse.jetty.http.HttpStatus;
|
|
||||||
import org.eclipse.jetty.http.HttpVersions;
|
import org.eclipse.jetty.http.HttpVersions;
|
||||||
import org.eclipse.jetty.http.ssl.SslSelectChannelEndPoint;
|
import org.eclipse.jetty.http.ssl.SslSelectChannelEndPoint;
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
@ -50,7 +49,6 @@ public class HttpConnection implements Connection
|
|||||||
private HttpGenerator _generator;
|
private HttpGenerator _generator;
|
||||||
private HttpParser _parser;
|
private HttpParser _parser;
|
||||||
private boolean _http11 = true;
|
private boolean _http11 = true;
|
||||||
private int _status;
|
|
||||||
private Buffer _connectionHeader;
|
private Buffer _connectionHeader;
|
||||||
private Buffer _requestContentChunk;
|
private Buffer _requestContentChunk;
|
||||||
private boolean _requestComplete;
|
private boolean _requestComplete;
|
||||||
@ -332,33 +330,30 @@ public class HttpConnection implements Connection
|
|||||||
no_progress = 0;
|
no_progress = 0;
|
||||||
if (_exchange != null)
|
if (_exchange != null)
|
||||||
{
|
{
|
||||||
if (_status!=HttpStatus.SWITCHING_PROTOCOLS_101 || !_exchange.onSwitchProtocol(_endp))
|
_exchange.disassociate();
|
||||||
{
|
_exchange = null;
|
||||||
_exchange.disassociate();
|
|
||||||
_exchange = null;
|
|
||||||
|
|
||||||
if (_pipeline == null)
|
if (_pipeline == null)
|
||||||
|
{
|
||||||
|
if (!isReserved())
|
||||||
|
_destination.returnConnection(this, close);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (close)
|
||||||
{
|
{
|
||||||
if (!isReserved())
|
if (!isReserved())
|
||||||
_destination.returnConnection(this, close);
|
_destination.returnConnection(this,close);
|
||||||
|
|
||||||
|
HttpExchange exchange = _pipeline;
|
||||||
|
_pipeline = null;
|
||||||
|
_destination.send(exchange);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (close)
|
HttpExchange exchange = _pipeline;
|
||||||
{
|
_pipeline = null;
|
||||||
if (!isReserved())
|
send(exchange);
|
||||||
_destination.returnConnection(this,close);
|
|
||||||
|
|
||||||
HttpExchange exchange = _pipeline;
|
|
||||||
_pipeline = null;
|
|
||||||
_destination.send(exchange);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
HttpExchange exchange = _pipeline;
|
|
||||||
_pipeline = null;
|
|
||||||
send(exchange);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,7 +398,6 @@ public class HttpConnection implements Connection
|
|||||||
{
|
{
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
_status=0;
|
|
||||||
if (_exchange.getStatus() != HttpExchange.STATUS_WAITING_FOR_COMMIT)
|
if (_exchange.getStatus() != HttpExchange.STATUS_WAITING_FOR_COMMIT)
|
||||||
throw new IllegalStateException();
|
throw new IllegalStateException();
|
||||||
|
|
||||||
@ -506,7 +500,6 @@ public class HttpConnection implements Connection
|
|||||||
if (exchange!=null)
|
if (exchange!=null)
|
||||||
{
|
{
|
||||||
_http11 = HttpVersions.HTTP_1_1_BUFFER.equals(version);
|
_http11 = HttpVersions.HTTP_1_1_BUFFER.equals(version);
|
||||||
_status=status;
|
|
||||||
exchange.getEventListener().onResponseStatus(version,status,reason);
|
exchange.getEventListener().onResponseStatus(version,status,reason);
|
||||||
exchange.setStatus(HttpExchange.STATUS_PARSING_HEADERS);
|
exchange.setStatus(HttpExchange.STATUS_PARSING_HEADERS);
|
||||||
}
|
}
|
||||||
|
@ -25,7 +25,6 @@ import org.eclipse.jetty.http.HttpSchemes;
|
|||||||
import org.eclipse.jetty.http.HttpURI;
|
import org.eclipse.jetty.http.HttpURI;
|
||||||
import org.eclipse.jetty.http.HttpVersions;
|
import org.eclipse.jetty.http.HttpVersions;
|
||||||
import org.eclipse.jetty.io.Buffer;
|
import org.eclipse.jetty.io.Buffer;
|
||||||
import org.eclipse.jetty.io.EndPoint;
|
|
||||||
import org.eclipse.jetty.io.BufferCache.CachedBuffer;
|
import org.eclipse.jetty.io.BufferCache.CachedBuffer;
|
||||||
import org.eclipse.jetty.io.ByteArrayBuffer;
|
import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
@ -657,13 +656,6 @@ public class HttpExchange
|
|||||||
return getClass().getSimpleName() + "@" + hashCode() + "=" + _method + "//" + _address + _uri + "#" + getStatus();
|
return getClass().getSimpleName() + "@" + hashCode() + "=" + _method + "//" + _address + _uri + "#" + getStatus();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*/
|
|
||||||
protected boolean onSwitchProtocol(EndPoint enpd) throws IOException
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Callback called when the request headers have been sent to the server.
|
* Callback called when the request headers have been sent to the server.
|
||||||
* This implementation does nothing.
|
* This implementation does nothing.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user