I've seen the following panic occur on retrieving context via the proxy, both in my own used of httpcache and via the cli sample (with modified listener port, e.g. 5000 instead of 80).
I cannot pin down exactly what it is about the content that is causing the crash. The same server runs without error for a long time, but then certain pages being served through the cache cause it to panic almost everytime (sometimes the first fetch works).
Note the content causing the crash is not cacheable - the Cache-Control header is set to no-store.
I've attached a sample that crashes the proxy. Note that I can retrieve the content directly via curl or in a browser without error.
As a general observation, this library (and any other solving this task) is a great fit for fuzzing with go-fuzz, it could find this issue and others like it.
I've seen the following panic occur on retrieving context via the proxy, both in my own used of httpcache and via the cli sample (with modified listener port, e.g. 5000 instead of 80).
I cannot pin down exactly what it is about the content that is causing the crash. The same server runs without error for a long time, but then certain pages being served through the cache cause it to panic almost everytime (sometimes the first fetch works).
Note the content causing the crash is not cacheable - the Cache-Control header is set to no-store.
I've attached a sample that crashes the proxy. Note that I can retrieve the content directly via curl or in a browser without error.
curl.out.zip
Environment information: