Skip to content

Commit

Permalink
use dot instead of comma in HTTP_VERSION
Browse files Browse the repository at this point in the history
See #213
  • Loading branch information
ar committed May 13, 2021
1 parent 7c47865 commit 7754873
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ public int prepare (long id, Serializable o) {
HttpVersion definedVersion = null;
httpVersion = getVersion(ctx);
if(httpVersion != null && httpVersion.length() > 0) {
String[] versions = httpVersion.split(",");
String[] versions = httpVersion.split(".");
definedVersion = new HttpVersion(Integer.parseInt(versions[0]), Integer.parseInt(versions[1]));
}
httpRequest.setProtocolVersion((definedVersion != null) ? definedVersion : HttpVersion.HTTP_1_1);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ public void testHttpVersionDefault() {
public void testHttpVersionSetValue() {
Context ctx = new Context();
ctx.put("HTTP_URL", "https://untrusted-root.badssl.com/");
ctx.put("HTTP_VERSION", "2,0");
ctx.put("HTTP_VERSION", "2.0");
ctx.put("HTTP_METHOD", "GET");
ctx.put("HTTP_TRUST_ALL_CERTS", "true");
mgr.queue(ctx);
Expand Down

0 comments on commit 7754873

Please sign in to comment.