Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
Handle.prototype.assignClientRequest = function assignClientRequest (req) {
var state = this._spdyState
var oldEnd = req.end
var oldSend = req._send
// Catch the headers before request will be sent
var self = this
// For old nodes
if (thing.mode !== 'modern') {
req.end = function end () {
this.end = oldEnd
this._send('')
return this.end.apply(this, arguments)
}
}
req._send = function send (data) {
this._headerSent = true
// for v0.10 and below, otherwise it will set `hot = false` and include
// headers in first write
this._header = 'ignore me'
Handle.prototype.assignClientRequest = function assignClientRequest (req) {
var state = this._spdyState
var oldEnd = req.end
var oldSend = req._send
// Catch the headers before request will be sent
var self = this
// For old nodes
if (thing.mode !== 'modern') {
req.end = function end () {
this.end = oldEnd
this._send('')
return this.end.apply(this, arguments)
}
}
req._send = function send (data) {
this._headerSent = true
// for v0.10 and below, otherwise it will set `hot = false` and include
// headers in first write
this._header = 'ignore me'