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

New Post: Empty response using https on Windows

$
0
0
I have a simple piece of test code that looks like this:
    http_client client(L"https://syntagmweb/cgi-bin/sc-validate.pl");

    // Make the request and asynchronously process the response. 
    return client.request(methods::GET).then([](http_response response)
    {
        TRACE(L"Server returned returned status code %d\n", response.status_code());

        // TODO: Perform actions here reading from the response stream.
        auto bodyStream = response.body();

        // In this example, we print the length of the response to the console.
        TRACE(L"Content length is %d\n", response.headers().content_length());
    });
When the URI in the http_client contructor uses 'http', the content length reported is around 2KB. But when the constructor uses 'https' the response length is 0. The response code is 200 in both cases. (The full URI is a local test server.)

Any ideas why no response data for the https version? If I use a browser with the two URIs I get the same results - around 2KB of web page.

Viewing all articles
Browse latest Browse all 4845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>