Boost logo

Boost Users :

Subject: [Boost-users] Boost [Asio] Problem with POST Request and async_read
From: anti00Zero (anti00Zero_at_[hidden])
Date: 2008-10-20 08:41:11


I've wrote a SSL Proxy and have a big problem.
I use a HTTP Client in bei Proxy to communicate with my HTTP Server.
HTTP Client and HTTP Server are localhost. A SSL Browser should call my local SSL Proxy and internal a HTTP Client communicate with my HTTP Server.
If the SSL Brower sends a POST request to my proxy, I have a problem.

This is my code:

async_write(m_HTTPSocket, buffer(m_sSSLRequestBuffer),
                                boost::bind(&CSession::HandleHTTPWriteRequest, this, placeholders::error));

void CSession::HandleHTTPWriteRequest(const error_code& error)
        if (!error)
                async_read(m_HTTPSocket, buffer(m_HTTPResponse, MAX_HTTPRESPONSE_BUFFER_LENGTH),
                        boost::bind(&CSession::HandleHTTPReadResponse, this, placeholders::error,
        else if(error != error::eof)

void CSession::HandleHTTPReadResponse(const error_code& error, size_t iTransferredBytes)

The error is boost::asio::error::connection_aborted (10053 (WSAECONNABORTED)). If I don't use my SSL Proxy the HTTP Browser works correct.

I use Visual Studio 2005 with Boost 1.36

Thanks for help.

Psssst! Schon vom neuen GMX MultiMessenger gehört? Der kann`s mit allen:

Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at