mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-28 03:20:11 +01: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();
|
reconnect();
|
||||||
if (!keepAlive)
|
if (!keepAlive)
|
||||||
request.setKeepAlive(false);
|
request.setKeepAlive(false);
|
||||||
if (!request.has(HTTPRequest::HOST))
|
if (!request.has(HTTPRequest::HOST) && !_host.empty())
|
||||||
request.setHost(_host, _port);
|
request.setHost(_host, _port);
|
||||||
if (!_proxyConfig.host.empty() && !bypassProxy())
|
if (!_proxyConfig.host.empty() && !bypassProxy())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -120,8 +120,13 @@ void TCPServer::run()
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
StreamSocket ss = _socket.acceptConnection();
|
StreamSocket ss = _socket.acceptConnection();
|
||||||
// enabe nodelay per default: OSX really needs that
|
// enable nodelay per default: OSX really needs that
|
||||||
ss.setNoDelay(true);
|
#if defined(POCO_OS_FAMILY_UNIX)
|
||||||
|
if (ss.address().family() != AddressFamily::UNIX_LOCAL)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ss.setNoDelay(true);
|
||||||
|
}
|
||||||
_pDispatcher->enqueue(ss);
|
_pDispatcher->enqueue(ss);
|
||||||
}
|
}
|
||||||
catch (Poco::Exception& exc)
|
catch (Poco::Exception& exc)
|
||||||
|
|||||||
Reference in New Issue
Block a user