Fix a regression in parsing an HTTP-Version string#677
Fix a regression in parsing an HTTP-Version string#677ras0219-msft merged 3 commits intomicrosoft:masterfrom
Conversation
…ng code out into http_version::from_string; add extra unit tests
|
Thanks for the PR! I adjusted the functions to reduce dependency on iostreams and locale. I also changed the |
|
I'm sorry, I don't understand the rationale for the adjustments. Most of the I think we'd be better to be consistent and transition all the APIs together if that's where you're going? Or if you want to stick with |
Primarily, this was avoiding adding any more functions where the word "string" refers to anything besides either "std::string" or the overload set of (potentially) all string types. It is a longer term goal to support UTF-8 in all APIs on all platforms (not necessarily to the exclusion of Since I'm not really sure what the concrete use cases are for these APIs (I just don't have any example programs to put them into context), I wanted to default to only adding the UTF-8 overload. However, the rest of the library does often use All the above said, I agree with making |
|
Hi @ras0219-msft, Thanks very much for taking the time to explain.
Personally, if that's the goal, I would try to get there by making
Please would you fix https://github.com/Microsoft/cpprestsdk/blob/master/Release/src/http/listener/http_server_asio.cpp#L662 as well? Thanks. |
Also pulling code out into http_version::from_string; adds some extra unit tests too.
As discussed in commentary on #565.