You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Mario Emmenlauer (Jira)" <ji...@apache.org> on 2020/04/22 07:35:00 UTC

[jira] [Commented] (THRIFT-5180) THttpClient requires a path when used with domain sockets

    [ https://issues.apache.org/jira/browse/THRIFT-5180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17089399#comment-17089399 ] 

Mario Emmenlauer commented on THRIFT-5180:
------------------------------------------

I will not be able to implement a fix for the error. But I'm under the impression that a viable solution would also be to require a resource URI for the transport? THRIFT-5178 already adds a default URI, which should help reduce the likelihood of the issue. To fully resolve it, one could make the constructor of THttpClient require a non-empty URI. However this may be a breaking change.

Thoughts about this?

> THttpClient requires a path when used with domain sockets
> ---------------------------------------------------------
>
>                 Key: THRIFT-5180
>                 URL: https://issues.apache.org/jira/browse/THRIFT-5180
>             Project: Thrift
>          Issue Type: Improvement
>          Components: C++ - Library
>    Affects Versions: 0.13.0
>            Reporter: Mario Emmenlauer
>            Priority: Minor
>
> When using the THttpClient with domain sockets, everything seems to work well as long as a service path is set in the client, for example
> {code}
> // create aTransport as a unix domain socket, then do:
> vTransport = std::make_shared<apache::thrift::transport::THttpClient>(aTransport, "localhost", "x");
> {code}
> But when the path is empty, the transport fails with
> {code}
>  Thrift: Mon Apr 20 16:10:22 2020 TConnectedClient died: Bad Status: POST
>  ThriftClient::ping(): Caught std::exception with message Could not refill buffer while calling the ping() method.
> {code}
> The error message "Could not refill buffer" points to a problem somewhere in the read method of THttpTransport.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)