Skip to content
This repository has been archived by the owner on Mar 12, 2018. It is now read-only.

Commit

Permalink
Reformatted and added some comments
Browse files Browse the repository at this point in the history
  • Loading branch information
gregw committed Nov 22, 2006
1 parent 5f7dd9b commit 2275f76
Show file tree
Hide file tree
Showing 9 changed files with 1,384 additions and 1,530 deletions.
23 changes: 11 additions & 12 deletions extras/ajp/src/main/java/org/mortbay/jetty/ajp/Ajp13Connection.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
* Connection implementation of the Ajp13 protocol. <p/> XXX Refactor to remove
* duplication of HttpConnection
*
* @author Markus Kobler markus(at)inquisitive-mind.com
* @author Markus Kobler markus(at)inquisitive-mind.com
* @author Greg Wilkins
*/
public class Ajp13Connection extends HttpConnection
Expand All @@ -53,11 +53,11 @@ public Ajp13Connection(Connector connector, EndPoint endPoint, Server server)
{
super(connector,endPoint,server);

_generator=new Ajp13Generator(_connector,_endp,_connector.getHeaderBufferSize(), _connector.getResponseBufferSize());
_generator=new Ajp13Generator(_connector,_endp,_connector.getHeaderBufferSize(),_connector.getResponseBufferSize());
_parser=new Ajp13Parser(_connector,_endp,new RequestHandler(),(Ajp13Generator)_generator);
_generator.setSendServerVersion(server.getSendServerVersion());
_server = server;
_server=server;

}

public boolean isConfidential(Request request)
Expand All @@ -72,17 +72,18 @@ public boolean isIntegral(Request request)

public ServletInputStream getInputStream()
{
if (_in==null)
if (_in==null)
_in=new Ajp13Parser.Input((Ajp13Parser)_parser,_connector.getMaxIdleTime());
return _in;
}

private class RequestHandler implements Ajp13Parser.EventHandler
{
boolean _delayedHandling = false;
boolean _delayedHandling=false;

public void startForwardRequest() throws IOException
{
_delayedHandling = false;
_delayedHandling=false;
_uri.clear();
_sslSecure=false;
_request.setTimeStamp(System.currentTimeMillis());
Expand All @@ -97,7 +98,7 @@ public void parsedMethod(Buffer method) throws IOException
public void parsedUri(Buffer uri) throws IOException
{
// TODO avoid this copy.
_uri.parse(uri.asArray(), 0, uri.length());
_uri.parse(uri.asArray(),0,uri.length());
}

public void parsedProtocol(Buffer protocol) throws IOException
Expand Down Expand Up @@ -162,11 +163,10 @@ public void headerComplete() throws IOException
}
}


public void messageComplete(long contextLength) throws IOException
{
}

public void content(Buffer ref) throws IOException
{
if (_delayedHandling)
Expand All @@ -175,7 +175,6 @@ public void content(Buffer ref) throws IOException
handleRequest();
}
}


}

Expand Down

0 comments on commit 2275f76

Please sign in to comment.