Skip to content

Commit

Permalink
Avoid sending chunked body to work around bugs
Browse files Browse the repository at this point in the history
In particular, both phantomjs and chromedriver cannot accept chunked
requests at the moment. See
ariya/phantomjs#15037 and
https://bugs.chromium.org/p/chromedriver/issues/detail?id=1850
respectively.
  • Loading branch information
jonhoo committed Jun 21, 2017
1 parent 600fff6 commit d273cb8
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -544,6 +544,8 @@ impl Client {
}
if let Some(ref body) = body {
req.headers_mut().set(hyper::header::ContentType::json());
req.headers_mut()
.set(hyper::header::ContentLength(body.len() as u64));
req.set_body(body.clone());
}

Expand Down

0 comments on commit d273cb8

Please sign in to comment.