integrated changes fro mmain repository

This commit is contained in:
Guenter Obiltschnig 2007-01-04 16:01:28 +00:00
Родитель 4a68362f6c
Коммит d615c47379
8 изменённых файлов: 17 добавлений и 16 удалений

Просмотреть файл

@ -1,7 +1,7 @@
// //
// Format.cpp // Format.cpp
// //
// $Id: //poco/1.3/Foundation/src/Format.cpp#3 $ // $Id: //poco/1.3/Foundation/src/Format.cpp#4 $
// //
// Library: Foundation // Library: Foundation
// Package: Core // Package: Core
@ -79,7 +79,7 @@ namespace
void parseWidth(std::ostream& str, std::string::const_iterator& itFmt, const std::string::const_iterator& endFmt) void parseWidth(std::ostream& str, std::string::const_iterator& itFmt, const std::string::const_iterator& endFmt)
{ {
int width = 0; int width = 0;
while (itFmt != endFmt && isdigit(*itFmt)) while (itFmt != endFmt && std::isdigit(*itFmt))
{ {
width = 10*width + *itFmt - '0'; width = 10*width + *itFmt - '0';
++itFmt; ++itFmt;
@ -94,7 +94,7 @@ namespace
{ {
++itFmt; ++itFmt;
int prec = 0; int prec = 0;
while (itFmt != endFmt && isdigit(*itFmt)) while (itFmt != endFmt && std::isdigit(*itFmt))
{ {
prec = 10*prec + *itFmt - '0'; prec = 10*prec + *itFmt - '0';
++itFmt; ++itFmt;

Просмотреть файл

@ -8,7 +8,7 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
SYSLIBS += -lssl -lcrypto -ldl SYSLIBS += -lssl -lcrypto
objects = HTTPSTimeServer objects = HTTPSTimeServer

Просмотреть файл

@ -8,7 +8,7 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
SYSLIBS += -lssl -lcrypto -ldl SYSLIBS += -lssl -lcrypto
objects = download objects = download

Просмотреть файл

@ -1,7 +1,7 @@
// //
// HTTPSClientSession.cpp // HTTPSClientSession.cpp
// //
// $Id: //poco/1.3/NetSSL_OpenSSL/src/HTTPSClientSession.cpp#1 $ // $Id: //poco/1.3/NetSSL_OpenSSL/src/HTTPSClientSession.cpp#2 $
// //
// Library: NetSSL_OpenSSL // Library: NetSSL_OpenSSL
// Package: HTTPSClient // Package: HTTPSClient
@ -91,7 +91,8 @@ std::ostream& HTTPSClientSession::sendRequest(HTTPRequest& request)
close(); close();
if (!connected()) if (!connected())
reconnect(); reconnect();
request.setKeepAlive(keepAlive); if (!keepAlive)
request.setKeepAlive(false);
request.setHost(getHost(), getPort()); request.setHost(getHost(), getPort());
{ {

Просмотреть файл

@ -8,7 +8,7 @@
include $(POCO_BASE)/build/rules/global include $(POCO_BASE)/build/rules/global
SYSLIBS += -lssl -lcrypto -ldl SYSLIBS += -lssl -lcrypto
objects = NetSSLTestSuite Driver \ objects = NetSSLTestSuite Driver \
HTTPSClientSessionTest HTTPSClientTestSuite HTTPSServerTest HTTPSServerTestSuite \ HTTPSClientSessionTest HTTPSClientTestSuite HTTPSServerTest HTTPSServerTestSuite \

Просмотреть файл

@ -1,7 +1,7 @@
// //
// HTTPSServerTest.cpp // HTTPSServerTest.cpp
// //
// $Id: //poco/1.3/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.cpp#1 $ // $Id: //poco/1.3/NetSSL_OpenSSL/testsuite/src/HTTPSServerTest.cpp#2 $
// //
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
@ -226,7 +226,7 @@ void HTTPSServerTest::testIdentityRequestKeepAlive()
HTTPSClientSession cs("localhost", svs.address().port()); HTTPSClientSession cs("localhost", svs.address().port());
cs.setKeepAlive(true); cs.setKeepAlive(true);
std::string body(5000, 'x'); std::string body(5000, 'x');
HTTPRequest request("POST", "/echoBody"); HTTPRequest request("POST", "/echoBody", HTTPMessage::HTTP_1_1);
request.setContentLength((int) body.length()); request.setContentLength((int) body.length());
request.setContentType("text/plain"); request.setContentType("text/plain");
cs.sendRequest(request) << body; cs.sendRequest(request) << body;
@ -240,7 +240,7 @@ void HTTPSServerTest::testIdentityRequestKeepAlive()
body.assign(1000, 'y'); body.assign(1000, 'y');
request.setContentLength((int) body.length()); request.setContentLength((int) body.length());
cs.setKeepAlive(false); request.setKeepAlive(false);
cs.sendRequest(request) << body; cs.sendRequest(request) << body;
cs.receiveResponse(response) >> rbody; cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == body.size()); assert (response.getContentLength() == body.size());
@ -260,7 +260,7 @@ void HTTPSServerTest::testChunkedRequestKeepAlive()
HTTPSClientSession cs("localhost", svs.address().port()); HTTPSClientSession cs("localhost", svs.address().port());
cs.setKeepAlive(true); cs.setKeepAlive(true);
std::string body(5000, 'x'); std::string body(5000, 'x');
HTTPRequest request("POST", "/echoBody"); HTTPRequest request("POST", "/echoBody", HTTPMessage::HTTP_1_1);
request.setContentType("text/plain"); request.setContentType("text/plain");
request.setChunkedTransferEncoding(true); request.setChunkedTransferEncoding(true);
cs.sendRequest(request) << body; cs.sendRequest(request) << body;
@ -273,7 +273,7 @@ void HTTPSServerTest::testChunkedRequestKeepAlive()
assert (rbody == body); assert (rbody == body);
body.assign(1000, 'y'); body.assign(1000, 'y');
cs.setKeepAlive(false); request.setKeepAlive(false);
cs.sendRequest(request) << body; cs.sendRequest(request) << body;
cs.receiveResponse(response) >> rbody; cs.receiveResponse(response) >> rbody;
assert (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH); assert (response.getContentLength() == HTTPMessage::UNKNOWN_CONTENT_LENGTH);

Просмотреть файл

@ -1,7 +1,7 @@
// //
// HTTPSTestServer.cpp // HTTPSTestServer.cpp
// //
// $Id: //poco/1.3/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.cpp#1 $ // $Id: //poco/1.3/NetSSL_OpenSSL/testsuite/src/HTTPSTestServer.cpp#2 $
// //
// Copyright (c) 2006, Applied Informatics Software Engineering GmbH. // Copyright (c) 2006, Applied Informatics Software Engineering GmbH.
// and Contributors. // and Contributors.
@ -201,7 +201,7 @@ std::string HTTPSTestServer::handleRequest() const
response.append(NumberFormatter::formatHex((unsigned) body.length())); response.append(NumberFormatter::formatHex((unsigned) body.length()));
response.append("\r\n"); response.append("\r\n");
response.append(body); response.append(body);
response.append("\r\n0\r\n"); response.append("\r\n0\r\n\r\n");
response.append("HTTP/1.1 200 OK\r\n"); response.append("HTTP/1.1 200 OK\r\n");
response.append("Connection: close\r\n"); response.append("Connection: close\r\n");
response.append("Content-Type: text/plain\r\n"); response.append("Content-Type: text/plain\r\n");

Просмотреть файл

@ -1 +1 @@
1.3-20070104-ssl (2007-01-04) 1.3-20070104 (2007-01-04)