mirror of
https://github.com/square/okhttp.git
synced 2026-01-12 10:23:16 +03:00
Permit GETs to have Content-Length: 0.
It's ridiculous, but Apache HTTP client wants it. Closes https://github.com/square/okhttp/issues/990
This commit is contained in:
@@ -524,7 +524,7 @@ public final class MockWebServer {
|
||||
List<Integer> chunkSizes = new ArrayList<>();
|
||||
MockResponse throttlePolicy = dispatcher.peek();
|
||||
if (contentLength != -1) {
|
||||
hasBody = true;
|
||||
hasBody = contentLength > 0;
|
||||
throttledTransfer(throttlePolicy, in, requestBody, contentLength);
|
||||
} else if (chunked) {
|
||||
hasBody = true;
|
||||
|
||||
Reference in New Issue
Block a user