-
Notifications
You must be signed in to change notification settings - Fork 634
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
how to get scheme name #2889
Comments
You can use Boost.URL for these purposes: https://www.boost.org/doc/libs/master/libs/url/doc/html/url/overview.html#url.overview.quick_look.accessing |
thanks very much |
Could you please elaborate on this? In which step do you want to access the scheme? An HTTP request only contains the target. |
such as "http:https://127.0.0.1:88/test" handle_request( req[http::field::host] can obtain "127.0.0.1:88" |
The HTTP request itself doesn't contain the scheme (http/https). The scheme is used by the client to establish the connection but isn't included in the request headers. To determine the scheme on the server side, you typically infer it from the server configuration or the connection context. For example, you can check if the connection uses SSL/TLS to decide if the scheme is "https". https://developer.mozilla.org/en-US/docs/Web/HTTP/Messages#http_requests |
thank you for your help in class ssl_http_session `
` |
http:https://127.0.0.1:88/test
sorry I didn't describe it fully, I have use example\advanced\server\advanced_server.cpp
I want to get the scheme name when the client accesses it
how to get the string "http:https://"?
The text was updated successfully, but these errors were encountered: