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

C++ REST SDK http_client doesn't fully support HTTP/1.0 with ASIO-based implementation #53

Closed
garethsb opened this issue Jan 30, 2019 · 3 comments

Comments

@garethsb
Copy link
Contributor

This only affects nmos-cpp Nodes which are built against cpprestsdk configured (at CMake time) with CPPREST_HTTP_CLIENT_IMPL=asio, which is the default on Linux but not Windows.

It only affects such Nodes when communicating with a Registry which only supports HTTP/1.0.
And it only causes any trouble when that Registry does not respond with a Connection: Keep-Alive header, but closes the connection after each response.

In this case, cpprestsdk still attempts to reuse the connection, and so the next request always fails.
This connection failure causes nmos-cpp Nodes to try the next available Registry.

This can be resolved by microsoft/cpprestsdk#1032, but this is not yet merged to cpprestsdk master.

@garethsb
Copy link
Contributor Author

garethsb commented Feb 1, 2019

I have identified that this issue could cause the NMOS Test Suite test_05 to fail with "Heartbeats are too frequent". See AMWA-TV/nmos-testing#120.

I have confirmed the cpprestsdk PR mentioned solves this problem.

@garethsb
Copy link
Contributor Author

Merged to cpprestsdk master at microsoft/cpprestsdk@f940d55.

Will close this when we can update the docs to point at a cpprestsdk version.

@garethsb
Copy link
Contributor Author

C++ REST SDK v2.10.11 includes the fixes for this (microsoft/cpprestsdk#1032), and also the two PRs related to security (microsoft/cpprestsdk#1049, microsoft/cpprestsdk#1051).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant