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

Don't use chunked transfer with HTTP/1.0 #2333

merged 1 commit into from Jul 6, 2019


Copy link

commented Jul 2, 2019

We've needed to communicate with some Axis device which listens using HTTP/1.0 and so don't know about chunked transfer.

From the specs:

Content-Length: <Ignored if ommitted or zero, or shall be set to transfer length of message body.>

When an audio stream is transmitted, the server receives a continuous flow of audio packets. The content type is only set at the beginning of the connection together with the content length that can have any value. When the connection is up and running the audio packets will come right after another without any extra information between the packets. The message body contains a block of binary data.

The content length must be set to a valid size and will generate a server response for every successful playback. If the playback fails, the connection will be closed without any response.

As we're sending live stream there, there is no way to use Content-Length and so device's server just closes the connection after some time when no more data are written to it.

This fixes the invalid use of chunked stream in this case and avoids glitches in stream received by the device.

@s-ludwig s-ludwig merged commit 9d7534c into vibe-d:master Jul 6, 2019
3 checks passed
3 checks passed
codecov/patch 100% of diff hit (target 31.981%)
continuous-integration/appveyor/pr AppVeyor build succeeded
continuous-integration/travis-ci/pr The Travis CI build passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.