lox / httpcache

An RFC7234 compliant golang http.Handler for caching HTTP responses
MIT License
264 stars 28 forks source link

Was this service designed for reverse proxy only? #23

Open elico opened 8 years ago

elico commented 8 years ago

Was this service designed for reverse proxy only? I can think of a way to use it in as a forward proxy but couple things are not really sitting in my head around the design of the software.

lox commented 8 years ago

The design oscillated between using http.Handler and http.RoundTripper, which is probably the key difference. I assume you are wanting to use it as a transport layer for a http.Client or something similar?

I'd really like to include a RoundTripper or Transport specifically for this. At the minute it could be done with the httptest.ResponseRecorder I believe. Happy to accept and collaborate on pull requests.

elico commented 8 years ago

I did't had much time to read the whole software but what I have tried is a defined proxy for curl\wget\firefox without the reverse proxy parts of the code and also with this: http://paste.ngtech.co.il/p15wshitz

I have encountered an unexpected issue and I wanted to first verify that I am using the tool properly and in the way it was supposed to be used.