Skip to content

Commit 0963f2e

Browse files
committed
fix HER-2059 with commons-httpclient workaround
1 parent a54dd8e commit 0963f2e

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

src/main/java/org/archive/httpclient/HttpRecorderGetMethod.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,4 +117,16 @@ protected void addProxyConnectionHeader(HttpState state, HttpConnection conn)
117117
super.addProxyConnectionHeader(state, conn);
118118
this.httpRecorderMethod.handleAddProxyConnectionHeader(this);
119119
}
120+
121+
// XXX see https://webarchive.jira.com/browse/HER-2059
122+
// We never call this method with the implied question mark prepended, so
123+
// adding it does the trick, since commons-httpclient will strip it later.
124+
public void setQueryString(String queryString) {
125+
if (queryString != null) {
126+
super.setQueryString('?' + queryString);
127+
} else {
128+
super.setQueryString(queryString);
129+
}
130+
}
131+
120132
}

0 commit comments

Comments
 (0)