Quantcast
Channel: WE MOVED to github.com/microsoft/cpprestsdk. This site is not monitored!
Viewing all articles
Browse latest Browse all 4845

Commented Unassigned: extract_string gzip error utf-8 [234]

$
0
0
1)

I get this http response header()

(L"Cache-Control", L"no-cache")
(L"Content-Encoding", L"gzip")
(L"Content-Length", L"792")
(L"Content-Type", L"application/json;charset=utf-8")
(L"Date", L"Sat, 16 Aug 2014 12:28:30 GMT")

I get the following http response:

auto v = response.extract_vector().get(); // throws system_error

//or

auto v = response.extract_vector().get();
return std::string(v.cbegin(), v.cend()); //mangled data

I suspect maybe you dont support gzip?

2)

My large application on window works with std::string, as all the 3rd party libraries and HTTP servers use that. I dont understand why Casablanca forces me to use std::wstring? It becomes inefficient for me to convert back and fort just to be able to use this networking library. Cant you have a separate build for std::string (like on linux)?

Regards Petke

Comments: Hi Petke, Please don't include multiple problems inside one issue on CodePlex. It makes it more difficult to track and fix. Regarding #2 I've [opened a separate issue](https://casablanca.codeplex.com/workitem/239) feature request for better support for UTF-8 single byte strings on Windows. Regarding #1 - What is the error code and message of the system_error exception you are getting? Is this a public server or site that I can try some code out against? Thanks, Steve

Viewing all articles
Browse latest Browse all 4845

Trending Articles