Closed
Description
I did some debug and figured out what's happened.
In my case, this is because I was using curl to post a request with a body size bigger than 1024. curl sends a http request with header expect: 100-continue
before sends the post request.
Looks like the problem is in Node http module:
// _http_client.js: 221
if (this.getHeader('expect')) {
if (this._header) {
throw new ERR_HTTP_HEADERS_SENT('render');
}
// here set headers for the request, so when we call proxyReq.setHeader later, it throw an exception
this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n',
this[outHeadersKey]);
}
Maybe we can check is here a expect
header before fire proxyReq
event, or ignore the setHeader invoke?
Metadata
Metadata
Assignees
Labels
No labels