[
https://issues.apache.org/jira/browse/THRIFT-4219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16043689#comment-16043689
]
James Mouradian commented on THRIFT-4219:
-----------------------------------------
I am in favor of making things consistent with other languages.
bq. The layout, behaviour and names of the methods at (especially) transport
and protocol levels are well-defined and consistent throughout the entire
library. We should not do anything that breaks consistency, as this is an
important part of the overall design.
I very well may be missing something, but I do not see how this behavior is
consistent across the library. Is the behavior throughout the library that a
call to {{Open}} can return a {{nil}} error, when the transport was not opened?
Are there any other one-shot transports, and if so, is there a clear set of
rules around which factory functions return one-shot transports, and which ones
do not?
If other languages do not have a one-off HTTP GET transport, I would be in
favor of removing this to be consistent with other languages. Additionally, it
would resolve the issue of having two different ways to handle a
{{THttpClient}} instance depending on which function was used to instantiate it.
> Golang Http Clients Created with Nil Buffer
> -------------------------------------------
>
> Key: THRIFT-4219
> URL: https://issues.apache.org/jira/browse/THRIFT-4219
> Project: Thrift
> Issue Type: Bug
> Components: Go - Library
> Reporter: James Mouradian
>
> As of 2b1b32c,
> [{{NewTHttpClientWithOptions}}|https://github.com/apache/thrift/blob/master/lib/go/thrift/http_client.go#L93]
> creates a {{THttpClient}} instance with a nil {{requestBuffer}}. This causes
> a panic when the instance attempts to write to the buffer.
> A patch probably fits well with THRIFT-4215 and THRIFT-4216.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)