[
https://issues.apache.org/jira/browse/THRIFT-4219?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16038395#comment-16038395
]
Can Celasun commented on THRIFT-4219:
-------------------------------------
[~jmrdi] {{NewTHttpClient}} is for making a single GET request, as can be seen
[here|https://github.com/apache/thrift/blob/8da0e720bb8e7550220cf1b360f3fb8aa37b9ded/lib/go/thrift/http_client.go#L89].
If you want to make POST requests (which is the only case where
{{requestBuffer}} is necessary), you need to use {{NewTHttpPostClient}}.
So this is not a bug.
> 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)