mirror of
https://github.com/http-party/node-http-proxy.git
synced 2025-12-08 20:59:18 +00:00
[fix] Remove special case handling of 304 responses since it was fixed in 182dcd3. Fixes #322.
This commit is contained in:
parent
ecb547223f
commit
28a3b0a6f0
@ -287,13 +287,6 @@ HttpProxy.prototype.proxyRequest = function (req, res, buffer) {
|
||||
});
|
||||
res.writeHead(response.statusCode);
|
||||
|
||||
// If `response.statusCode === 304`: No 'data' event and no 'end'
|
||||
if (response.statusCode === 304) {
|
||||
try { res.end() }
|
||||
catch (ex) { console.error("res.end error: %s", ex.message) }
|
||||
return;
|
||||
}
|
||||
|
||||
function ondata(chunk) {
|
||||
if (res.writable) {
|
||||
if (false === res.write(chunk) && response.pause) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user