Skip to content
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

Send Content-Length header in json_response #328

Merged
merged 1 commit into from
Dec 15, 2019
Merged

Send Content-Length header in json_response #328

merged 1 commit into from
Dec 15, 2019

Conversation

linusg
Copy link
Member

@linusg linusg commented Dec 14, 2019

This is useful for large responses (imagine years of location data), so the client can compute a progress percentage.

It works, but I'm not sure if this is the best way of doing it, or a good one at all. My C is terrible.

@jpmens jpmens merged commit c4404db into owntracks:master Dec 15, 2019
@jpmens
Copy link
Member

jpmens commented Dec 15, 2019

Merged, thank you. It looks ok to me, though I’m a bit skeptical of the NULL in the first snprintf(); I’ve checked man pages and that doesn’t seem to be clearly documented to me. Interesting.

But, as I said: it’s fine. In case of doubt, or if we find it doesn’t build somewhere, I’ll replace it with a long static buffer. :-)

@linusg linusg deleted the content-length-header branch December 15, 2019 10:17
jpmens added a commit that referenced this pull request Jul 1, 2020
jpmens added a commit that referenced this pull request Jun 29, 2021
- UPD: Leaflet GeoJSON map point popups now contain accuracy if available (#352)
- FIX: prefix Content-Length by X- to avoid issues with chunked encoding #350
- FIX: fix off-by-one error introduced in #328 (Safari only)
wollew pushed a commit to wollew/recorder that referenced this pull request Feb 2, 2022
wollew pushed a commit to wollew/recorder that referenced this pull request Feb 2, 2022
- UPD: Leaflet GeoJSON map point popups now contain accuracy if available (owntracks#352)
- FIX: prefix Content-Length by X- to avoid issues with chunked encoding owntracks#350
- FIX: fix off-by-one error introduced in owntracks#328 (Safari only)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants