-
Notifications
You must be signed in to change notification settings - Fork 21
Remove cpprest dependency in REST listener #65
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
Remove cpprest dependency in REST listener #65
Conversation
Track num connections. Send agent version.
009e96c to
c6ec8af
Compare
| RETURN_HTTP_STATUSCODE_STR(BadRequest); | ||
| RETURN_HTTP_STATUSCODE_STR(NotFound); | ||
| RETURN_HTTP_STATUSCODE_STR(InternalError); | ||
| RETURN_HTTP_STATUSCODE_STR(ServiceUnavailable); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If it's not one of these 5, then the http status code string is set to "StatusDescription" in HttplistenerConnection::Reply(), is this intended? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, we currently don't use anything else. The description actually doesn't matter in the protocol since it is purely for humans to read.
| ss << "Content-Length: " << body.size() << "\r\n"; | ||
| } | ||
| ss << "Server: Delivery-Optimization-Agent/" << microsoft::deliveryoptimization::util::details::SimpleVersion() << "\r\n"; | ||
| ss << "\r\n"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This crlf is used for the empty header correct? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it signifies the end of the header section.
| if (ec) | ||
| { | ||
| DoLogError("Async accept failed, error = %d", ec.value()); | ||
| // TODO(shishirb) terminate process by throwing exception? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to try again up until n failures? #Closed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe. The only time I've seen a failure here is during shutdown notifying us that socket is closed (expected). So I'll leave it as is until we see other retry-able errors.
jimson-msft
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
![]()
* Remove cpprest from listener * Listener conns keep alive. Track num connections. * Send agent version in REST response. * SDK: Fix rest_interface_tests
* Remove cpprest from listener * Listener conns keep alive. Track num connections. * Send agent version in REST response. * SDK: Fix rest_interface_tests
* Remove cpprest from listener * Listener conns keep alive. Track num connections. * Send agent version in REST response. * SDK: Fix rest_interface_tests
* Remove cpprest from listener * Listener conns keep alive. Track num connections. * Send agent version in REST response. * SDK: Fix rest_interface_tests
No description provided.