mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-16 18:56:52 +02:00
make TCPServer and HTTPClientSession work with UNIX local sockets
This commit is contained in:
@@ -205,7 +205,7 @@ std::ostream& HTTPClientSession::sendRequest(HTTPRequest& request)
|
||||
reconnect();
|
||||
if (!keepAlive)
|
||||
request.setKeepAlive(false);
|
||||
if (!request.has(HTTPRequest::HOST))
|
||||
if (!request.has(HTTPRequest::HOST) && !_host.empty())
|
||||
request.setHost(_host, _port);
|
||||
if (!_proxyConfig.host.empty() && !bypassProxy())
|
||||
{
|
||||
|
@@ -120,8 +120,13 @@ void TCPServer::run()
|
||||
try
|
||||
{
|
||||
StreamSocket ss = _socket.acceptConnection();
|
||||
// enabe nodelay per default: OSX really needs that
|
||||
ss.setNoDelay(true);
|
||||
// enable nodelay per default: OSX really needs that
|
||||
#if defined(POCO_OS_FAMILY_UNIX)
|
||||
if (ss.address().family() != AddressFamily::UNIX_LOCAL)
|
||||
#endif
|
||||
{
|
||||
ss.setNoDelay(true);
|
||||
}
|
||||
_pDispatcher->enqueue(ss);
|
||||
}
|
||||
catch (Poco::Exception& exc)
|
||||
|
Reference in New Issue
Block a user