Skip to content

Content-length header missing in response on Win10 UWP with compressed response #315

@jhandley

Description

@jhandley

When sending a GET request to a server that responds with gzip encoding in a UWP on Windows 10 the content-length and content-encoding headers are not included in the http_response::headers(). Both of the headers are visible in Wireshark so they must be getting removed somewhere along the line.

Without the content-length of the response there is no way to show download progress.

Test code:

http_client client(U("http://www.teleyah.com"));	auto requestTask = client.request(methods::GET).then([=](http_response response)	{	for (auto h : response.headers()) {	OutputDebugString(h.first.c_str());	OutputDebugString(L" : ");	OutputDebugString(h.second.c_str());	OutputDebugString(L"\n");	}	});	try {	requestTask.wait();	}	catch (const std::exception &e) {	} 

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions