-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Add support for retrieving HTTP version of a request in HTTP listener #565
Conversation
…pose in http_request
…for consistency with rest of class public interface
2ef736d
to
85e0450
Compare
…e been in commit:1ba5ebfd
Thanks! I changed |
Thanks for working on these, @ras0219-msft. I think there is one problem with the struct http_version commit. operator>> with uint8_t doesn't do what we want, it reads a character. If I'm right, we need to restore the temporary unsigned ints, around here: 1d35847#diff-d8600089329e519f56170a2d16d7102cR657. |
You are absolutely right. I'll address this tomorrow or I'd be happy to merge a PR. |
Perhaps it's worth pulling the parsing code out into a unit testable function? |
Ah, the existing unit test is failing when cpprestsdk is configured with
|
This PR follows on from #507 by providing a mechanism to allow the HTTP version of the incoming message to be retrieved in the HTTP listener. (One motivation is to allow construction of access logs in Common Log Format.) A basic unit test is included.
It also changes http_request::get_remote_address() introduced by #507 to http_request::remote_address() for consistency with pre-existing member functions of this class.
It also includes a commit that fixes #545 which has been reported against #507.