Boost logo

Boost :

Subject: Re: [boost] [asio] HTTPS async_read() question
From: Gregory Dai (gregory.dai_at_[hidden])
Date: 2008-10-23 23:12:35


Thank you, Mathias, for replying.

I figured it out. The server finished sending all data and shut down its TCP
endpoint, for which the last async_read() call threw an exception (of
ESHUTDOWN), which aborted my logic flow.

I was thrilled that it finally worked. I was also able to get a synchronous
version to work. Use read() instead of async_read(), and also an
asio::streambuf to collect everything in the response in one read() call.

Cheers,
Greg

On Thu, Oct 23, 2008 at 3:18 AM, Mathias Gaunard <
mathias.gaunard_at_[hidden]> wrote:

> Gregory Dai wrote:
>
>> I'm playing with the following SSL client example against an https site:
>>
> > [...]
>
>> I'm able to get more than 20k data
>> in response, but unable to reach the end of the data stream as the browser
>> can.
>>
>
> To know where the end of data is an HTTP keep-alive connection, you have to
> use the Content-Length header or the chunked transfer encoding.
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk