http-stale-cache-proxy
http-stale-cache-proxy copied to clipboard
Problem with node 0.10
I get the following error when i try to use a simple cache same as sample code in main page It works fine at first, but the exception gets throw after 5-6 https requests.
v0.10.33 _stream_readable.js:748 throw new Error('Cannot switch to old mode now.'); ^ Error: Cannot switch to old mode now. at emitDataEvents (_stream_readable.js:748:11) at IncomingMessage.Readable.pause (_stream_readable.js:739:3) at IncomingMessage.ondata (/home/nodejs/cache/node_modules/http-stale-cache-proxy/node_modules/http-proxy/lib/node-http-proxy/http-proxy.js:361:20) at IncomingMessage.emit (events.js:95:17) at flow (_stream_readable.js:614:9) at IncomingMessage.pipeOnReadable (stream_readable.js:642:5) at IncomingMessage.emit (events.js:92:17) at emitReadable (_stream_readable.js:426:10) at emitReadable (_stream_readable.js:422:5) at readableAddChunk (_stream_readable.js:165:9)
but there is no problem when node is downgraded to v0.8.28.
I think that it may be an incompatibility of the older version of node-http-proxy
used in http-stale-cache-proxy
with node > v0.8.