protocol: fix request headers in urlRequestFetchJob
This commit is contained in:
parent
7ceca9f426
commit
b0e73532de
2 changed files with 2 additions and 4 deletions
|
@ -107,10 +107,7 @@ URLRequestFetchJob::URLRequestFetchJob(
|
|||
}
|
||||
|
||||
// Use |request|'s headers.
|
||||
net::HttpRequestHeaders headers;
|
||||
if (request->GetFullRequestHeaders(&headers)) {
|
||||
fetcher_->SetExtraRequestHeaders(headers.ToString());
|
||||
}
|
||||
fetcher_->SetExtraRequestHeaders(request->extra_request_headers().ToString());
|
||||
}
|
||||
|
||||
net::URLRequestContextGetter* URLRequestFetchJob::GetRequestContext() {
|
||||
|
|
|
@ -81,6 +81,7 @@ describe 'protocol module', ->
|
|||
|
||||
it 'returns RequestHttpJob should send respone', (done) ->
|
||||
server = http.createServer (req, res) ->
|
||||
assert.notEqual req.headers.accept, ''
|
||||
res.writeHead(200, {'Content-Type': 'text/plain'})
|
||||
res.end('hello')
|
||||
server.close()
|
||||
|
|
Loading…
Reference in a new issue