-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HTTPClientSession not working with UNIX_LOCAL SocketAddress #2578
Comments
Still valid with 1.9.4 |
I also encountered this bug. I also found a workaround - create StreamSocket and pass it to HTTPClientSession: Poco::Net::SocketAddress socketAddress(Poco::Net::SocketAddress::UNIX_LOCAL, socketPath);
Poco::Net::StreamSocket socket(socketAddress);
Poco::Net::HTTPClientSession session(socket); |
This issue is stale because it has been open for 365 days with no activity. |
This issue is stale because it has been open for 365 days with no activity. |
aleks-f
changed the title
Poco::Net::HTTPClientSession does not work with a Poco::Net::SocketAddress with family UNIX_LOCAL
HTTPClientSession not working with UNIX_LOCAL SocketAddress
Nov 25, 2023
aleks-f
added a commit
that referenced
this issue
Nov 25, 2023
aleks-f
added a commit
that referenced
this issue
Nov 26, 2023
* fix(sharedMemory): x64 size error #2976 * chore: add Util dependency to Prometheus samples * fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578 * fix(WebSocketTest): supress connection reset exception assertion * fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows * fix(build): add DataTest dependency to Makefile * fix(Task): intermittently hanging test and some other improvements * fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
aleks-f
added a commit
that referenced
this issue
Nov 27, 2023
* fix(sharedMemory): x64 size error #2976 * chore: add Util dependency to Prometheus samples * fix(HTTPClientSession): not working with UNIX_LOCAL SocketAddress #2578 * fix(WebSocketTest): supress connection reset exception assertion * fix(PollSet): wait on premature epoll_wait return; reinforce tests for windows * fix(build): add DataTest dependency to Makefile * fix(Task): intermittently hanging test and some other improvements * fix(Net): PollSet loop; suppress test WebSocket handler shutdown IOExeption
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Expected behavior
I'm trying to use
Poco::Net::HTTPClientSession
to communicate with Docker, which exposes an HTTP interface over a UNIX domain socket. I would expectHTTPClientSession
to beSocketAddress
agnostic, and for it to be able to talk HTTP over whatever socket the caller supplies.Actual behavior
The constructor for
HTTPClientSession
callshost()
on the suppliedSocketAddress
:https://github.com/pocoproject/poco/blob/develop/Net/src/HTTPClientSession.cpp#L72
Unfortunately,
host()
throws andInvalidAccessException
:https://github.com/pocoproject/poco/blob/develop/Net/include/Poco/Net/SocketAddressImpl.h#L211
Steps to reproduce the problem
The following program will trigger the problem:
Compiled with:
Running this results in:
The backtrace looks like:
POCO version
Compiler and version
Operating system and version
Other relevant information
N/A
The text was updated successfully, but these errors were encountered: