Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: Cappy – http proxy with file based caching (github.com/compileinc)
4 points by cyriacthomas on March 28, 2017 | hide | past | favorite | 3 comments



Looks like it could be useful, thanks for sharing. Did you consider adding sendfile() support? There appears to be a python module that implements it.

Also, I see the gzip support, but you should also be able to send the gzipped file as-is (with the right content-length, etc) if the Vary headers from the client support it.

Edit: I don't see it figuring out, and sending, the right Content-type header. Or is that functionality that comes with the base class you're using to serve http?


Hi, I'm one of the contributors to cappy. Thank you for the suggestions.

No sendfile() support as of now but seems like a good addition as it probably would speed up the caching.

The base HTTP server class sends only the timestamp and version and doesn't send the Content-type header. Python's SimpleHTTPServer[1] does this in a simple-enough manner and it would make a good pull-request :)

[1] https://github.com/enthought/Python-2.7.3/blob/master/Lib/Si...


Looks cool but now I have to rename my project. I was going to use the cappy namespace on PyPi.




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: