Commit bc1ee8a2 authored by xhwang's avatar xhwang Committed by Commit bot

html_viewer: Set expected content length to -1 in ToWebURLResponse().

Currently ToWebURLResponse() is not setting the expected content length. The
default value from Blink is 0. In Chromium, -1 means "Not available". This CL
sets this value to -1 to be consistent with the Chromium net/ code. See
content/public/common/resource_response_info.h.

BUG=468489
TEST=html_viewer works with streaming servers.

Review URL: https://codereview.chromium.org/1013413003

Cr-Commit-Position: refs/heads/master@{#321600}
parent 4a92659e
......@@ -45,6 +45,7 @@ blink::WebURLResponse ToWebURLResponse(const URLResponsePtr& url_response) {
result.setTextEncodingName(blink::WebString::fromUTF8(url_response->charset));
result.setHTTPVersion(StatusLineToHTTPVersion(url_response->status_line));
result.setHTTPStatusCode(url_response->status_code);
result.setExpectedContentLength(-1); // Not available.
// TODO(darin): Initialize timing properly.
blink::WebURLLoadTiming timing;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment