merge master
This commit is contained in:
commit
957d39da17
|
@ -1,4 +1,4 @@
|
|||
jetty-8.1.6-SNAPSHOT
|
||||
jetty-7.6.6-SNAPSHOT
|
||||
|
||||
jetty-8.1.5.v20120713 - 13 July 2012
|
||||
+ 376717 Balancer Servlet with round robin support, contribution, added
|
||||
|
|
|
@ -85,7 +85,6 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
|||
|
||||
protected String _insertSession;
|
||||
protected String _deleteSession;
|
||||
protected String _selectSession;
|
||||
protected String _updateSession;
|
||||
protected String _updateSessionNode;
|
||||
protected String _updateSessionAccessTime;
|
||||
|
@ -112,6 +111,7 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
|||
boolean _isUpper;
|
||||
|
||||
|
||||
|
||||
public DatabaseAdaptor (DatabaseMetaData dbMeta)
|
||||
throws SQLException
|
||||
{
|
||||
|
@ -189,6 +189,39 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
|||
|
||||
return "rowId";
|
||||
}
|
||||
|
||||
|
||||
public boolean isEmptyStringNull ()
|
||||
{
|
||||
return (_dbName.startsWith("oracle"));
|
||||
}
|
||||
|
||||
public PreparedStatement getLoadStatement (Connection connection, String rowId, String contextPath, String virtualHosts)
|
||||
throws SQLException
|
||||
{
|
||||
if (contextPath == null || "".equals(contextPath))
|
||||
{
|
||||
if (isEmptyStringNull())
|
||||
{
|
||||
PreparedStatement statement = connection.prepareStatement("select * from "+_sessionTable+
|
||||
" where sessionId = ? and contextPath is null and virtualHost = ?");
|
||||
statement.setString(1, rowId);
|
||||
statement.setString(2, virtualHosts);
|
||||
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
PreparedStatement statement = connection.prepareStatement("select * from "+_sessionTable+
|
||||
" where sessionId = ? and contextPath = ? and virtualHost = ?");
|
||||
statement.setString(1, rowId);
|
||||
statement.setString(2, contextPath);
|
||||
statement.setString(3, virtualHosts);
|
||||
|
||||
return statement;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -629,9 +662,6 @@ public class JDBCSessionIdManager extends AbstractSessionIdManager
|
|||
_deleteSession = "delete from "+_sessionTable+
|
||||
" where "+_sessionTableRowId+" = ?";
|
||||
|
||||
_selectSession = "select * from "+_sessionTable+
|
||||
" where sessionId = ? and contextPath = ? and virtualHost = ?";
|
||||
|
||||
_updateSession = "update "+_sessionTable+
|
||||
" set lastNode = ?, accessTime = ?, lastAccessTime = ?, lastSavedTime = ?, expiryTime = ?, map = ? where "+_sessionTableRowId+" = ?";
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ import java.sql.Connection;
|
|||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.Statement;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.ListIterator;
|
||||
|
@ -833,10 +834,7 @@ public class JDBCSessionManager extends AbstractSessionManager
|
|||
try
|
||||
{
|
||||
connection = getConnection();
|
||||
statement = connection.prepareStatement(_jdbcSessionIdMgr._selectSession);
|
||||
statement.setString(1, id);
|
||||
statement.setString(2, canonicalContextPath);
|
||||
statement.setString(3, vhost);
|
||||
statement = _jdbcSessionIdMgr._dbAdaptor.getLoadStatement(connection, id, canonicalContextPath, vhost);
|
||||
ResultSet result = statement.executeQuery();
|
||||
if (result.next())
|
||||
{
|
||||
|
|
|
@ -79,6 +79,15 @@ public class IncludableGzipFilter extends GzipFilter
|
|||
{
|
||||
return new GZIPOutputStream(_response.getOutputStream(),_bufferSize);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setHeader(String name, String value)
|
||||
{
|
||||
super.setHeader(name, value);
|
||||
HttpServletResponse response = (HttpServletResponse)getResponse();
|
||||
if (!response.containsHeader(name))
|
||||
response.setHeader("org.eclipse.jetty.server.include." + name, value);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -97,6 +106,15 @@ public class IncludableGzipFilter extends GzipFilter
|
|||
{
|
||||
return new DeflaterOutputStream(_response.getOutputStream(),new Deflater(_deflateCompressionLevel, _deflateNoWrap));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void setHeader(String name, String value)
|
||||
{
|
||||
super.setHeader(name, value);
|
||||
HttpServletResponse response = (HttpServletResponse)getResponse();
|
||||
if (!response.containsHeader(name))
|
||||
response.setHeader("org.eclipse.jetty.server.include." + name, value);
|
||||
}
|
||||
};
|
||||
}
|
||||
};
|
||||
|
@ -124,7 +142,7 @@ public class IncludableGzipFilter extends GzipFilter
|
|||
super.setHeader(name,value);
|
||||
HttpServletResponse response = (HttpServletResponse)getResponse();
|
||||
if (!response.containsHeader(name))
|
||||
response.setHeader("org.eclipse.jetty.server.include."+name,value);;
|
||||
response.setHeader("org.eclipse.jetty.server.include."+name,value);
|
||||
}
|
||||
@Override
|
||||
protected PrintWriter newWriter(OutputStream out, String encoding) throws UnsupportedEncodingException
|
||||
|
|
|
@ -47,6 +47,7 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
Headers.Header hostHeader = headers.get(HTTPSPDYHeader.HOST.name(clientVersion));
|
||||
if (hostHeader == null)
|
||||
{
|
||||
logger.debug("No host header found: " + headers);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
|
@ -59,6 +60,7 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
ProxyServerInfo proxyServerInfo = getProxyServerInfo(host);
|
||||
if (proxyServerInfo == null)
|
||||
{
|
||||
logger.debug("No matching ProxyServerInfo found for: " + host);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
|
@ -67,6 +69,7 @@ public class ProxyEngineSelector extends ServerSessionFrameListener.Adapter
|
|||
ProxyEngine proxyEngine = proxyEngines.get(protocol);
|
||||
if (proxyEngine == null)
|
||||
{
|
||||
logger.debug("No matching ProxyEngine found for: " + protocol);
|
||||
rst(clientStream);
|
||||
return null;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue