Attached is a patch that allows the WSGI server to transparently decompress incoming requests that use Content-Encoding: gzip. With this patch, I can now serve the dulwich git repo with dul-web and successfully clone it with c git.
The relevant bits are in dulwich/web.py (GunzipFilter and LengthLimitedInput). They both are implemented as simple WSGI middleware apps that operate on wsgi.input. I had to retain the logic in handle_service_request to ensure that wsgi.input was limited, as tests in compat/ would start mysteriously hanging without it. I added a GunzipTestCase as well, and in so doing restructured HTTPGitApplicationTestCase to be able to share some of its logic for setting up a simple scenario. -- Thanks, David Blewett
gzipfilter.diff
Description: Binary data
_______________________________________________ Mailing list: https://launchpad.net/~dulwich-users Post to : [email protected] Unsubscribe : https://launchpad.net/~dulwich-users More help : https://help.launchpad.net/ListHelp

