mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-23 08:31:43 +02:00
integrated changes from main repository
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HTTPChunkedStream.cpp
|
||||
//
|
||||
// $Id: //poco/1.3/Net/src/HTTPChunkedStream.cpp#2 $
|
||||
// $Id: //poco/1.3/Net/src/HTTPChunkedStream.cpp#3 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTP
|
||||
@@ -102,7 +102,12 @@ int HTTPChunkedStreamBuf::readFromDevice(char* buffer, std::streamsize length)
|
||||
if (n > 0) _chunk -= n;
|
||||
return n;
|
||||
}
|
||||
else return 0;
|
||||
else
|
||||
{
|
||||
int ch = _session.get();
|
||||
while (ch != eof && ch != '\n') ch = _session.get();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
//
|
||||
// HTTPClientSession.cpp
|
||||
//
|
||||
// $Id: //poco/1.3/Net/src/HTTPClientSession.cpp#1 $
|
||||
// $Id: //poco/1.3/Net/src/HTTPClientSession.cpp#2 $
|
||||
//
|
||||
// Library: Net
|
||||
// Package: HTTPClient
|
||||
@@ -164,7 +164,8 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
close();
|
||||
if (!connected())
|
||||
reconnect();
|
||||
request.setKeepAlive(keepAlive);
|
||||
if (!keepAlive)
|
||||
request.setKeepAlive(false);
|
||||
request.setHost(_host, _port);
|
||||
if (!_proxyHost.empty())
|
||||
request.setURI(getHostInfo() + request.getURI());
|
||||
|
Reference in New Issue
Block a user