-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload content encoding #117
Comments
Hi, MLS accepts gzipped requests, see https://github.com/mozilla/ichnaea/blob/efe73300296436f1b6a8d10db9739ffc3711ba94/ichnaea/api/views.py#L106 Ideally we want to compress the data submissions, because the amount of data can be quite large. I guess there could be an option to disable compression, but maybe you can configure your server to accept gzipped requests? |
This content-encoding header is valid, the framework I'm using for my server automatically decompresses the data for me because of this header. |
It is not a problem to transmit the data in a compressed way; and indeed the header content-encoding will be useful on the server side for decoding. So I modified the modsecurity detection rules to bypass the blocking. For info, the extracts from the error log:
|
Closing this because the problem should be fixed on server side |
Hi,
I tested sending to my server by defining a custom full path, but the request generates a 403 error. Apache ModSecurity blocks this request.
Looking at the error logs, it seems to come from the "Content-Encoding" header. So I tested the Android code by commenting out the line ".addHeader("Content-Encoding", "gzip")" and it works!
I'm not familiar with HTTP and it seems that the "Content-Encoding" header should rather be used in the server -> client direction and not the other way around; hence the blocking.
More fundamentally, your app compresses the data sent in gzip format. Was this a specification requested by MLS? If not, it would be simpler to transmit the json data uncompressed and use the header ("Content-Type", "application/json")
The text was updated successfully, but these errors were encountered: