Response headers returned by Google's NaCL are incomplete. I can see in the network tab of chrome developer tools that browser actually received all the headers but NaCl is returning me incomplete headers in c++ code.
Headers i see in network tab of chrome:
HTTP/1.1 200 OK
Content-Type: application/octet-stream
Content-Length: 3312
Connection: keep-alive
Date: Wed, 14 Sep 2016 02:12:37 GMT
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET
Last-Modified: Wed, 14 Sep 2016 02:12:37 GMT
ETag: "644c53b76e0fd646aad2f4aaf313067d"
x-amz-version-id: rMFIbU5ptnyKgwn1_YRNr5OkEkTT8cEV
Accept-Ranges: bytes
Server: AmazonS3
Vary: Origin
X-Cache: Miss from cloudfront
Via: 1.1 a75bbd1dd9f3f983d073b0972494851d.cloudfront.net (CloudFront)
X-Amz-Cf-Id: 41xr_GlfJLkZ_SszRBmy62jCVjQgCl9sgyHtusJjc95Tb91BISksyg==
Headers i receive in c++ code from NaCL:
Content-Type: application/octet-stream
Last-Modified: Wed, 14 Sep 2016 02:12:37 GMT
This is how i access and print headers received form NaCL:
//Following is inside callback method passed to pp::URLLoader::Open method as second argument.
auto response = _pLoader->GetResponseInfo();
auto headers = response.GetHeaders().AsString();
std::cout<< headers << std::endl;
Question: How can i get all the headers and print them?
Aucun commentaire:
Enregistrer un commentaire