Skip to content
This repository has been archived by the owner on Sep 23, 2020. It is now read-only.

Commit

Permalink
Fix for Bug 6992: Nimbus EC2 Query API limits HTTP headers to 4k
Browse files Browse the repository at this point in the history
  • Loading branch information
timf committed Apr 30, 2010
1 parent 2899e45 commit 080181c
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
Expand Up @@ -202,10 +202,10 @@

<property name="enabled" value="$QUERY{query.enabled}"/>
<property name="port" value="$QUERY{https.port}" />
<property name="headerBufferBytes" value="$QUERY{query.header.size}"/>
<property name="keystoreLocation" value="$QUERY{keystore.path}"/>
<property name="keystorePassword" value="$QUERY{keystore.password}"/>
<property name="springConfig" value="$QUERY{query.spring.path}"/>

</bean>

<!-- TODO this should happen somewhere else... -->
Expand Down
2 changes: 2 additions & 0 deletions messaging/query/java/source/etc/query/query.conf
Expand Up @@ -32,3 +32,5 @@ query.spring.path=file://@QUERY_CONFDIR@/other/main.xml
# path of file containing mappings of query access credentials to DNs
query.usermap.path=/@QUERY_CONFDIR@/users.txt

# header buffer size in bytes (for larger user-data, etc.)
query.header.size=8192
Expand Up @@ -34,6 +34,7 @@ public class HttpQuery {

private boolean enabled;
private int port;
private int headerBufferBytes;
private String springConfig;
private Server server;
private String keystoreLocation;
Expand Down Expand Up @@ -65,6 +66,9 @@ public synchronized void startListening() throws Exception {

SslSocketConnector sslConnector = new SslSocketConnector();
sslConnector.setPort(port);
if (this.headerBufferBytes > 0) {
sslConnector.setHeaderBufferSize(this.headerBufferBytes);
}
sslConnector.setKeystore(keystoreLocation);
sslConnector.setKeyPassword(keystorePassword);
sslConnector.setPassword(keystorePassword);
Expand Down Expand Up @@ -106,6 +110,14 @@ public void setPort(int port) {
this.port = port;
}

public int getHeaderBufferBytes() {
return headerBufferBytes;
}

public void setHeaderBufferBytes(int headerBufferBytes) {
this.headerBufferBytes = headerBufferBytes;
}

public String getSpringConfig() {
return springConfig;
}
Expand Down

0 comments on commit 080181c

Please sign in to comment.