Reverted change made to vendored thrift library which caused some issues when vendoring gorealis itself. Added a workaround to overcome the default httpPostClient in the thrift library defaulting to headers for the thrift JSON protocol

This commit is contained in:
Renan DelValle 2017-03-23 19:18:23 -04:00
parent 8f505815d5
commit cb6100e690
2 changed files with 8 additions and 3 deletions

View file

@ -103,7 +103,7 @@ func NewTHttpClientWithOptions(urlstr string, options THttpClientOptions) (TTran
if client == nil {
client = DefaultHttpClient
}
httpHeader := map[string][]string{}
httpHeader := map[string][]string{"Content-Type": []string{"application/x-thrift"}}
return &THttpClient{client: client, response: response, url: parsedURL, header: httpHeader}, nil
}
@ -121,7 +121,7 @@ func NewTHttpPostClientWithOptions(urlstr string, options THttpClientOptions) (T
if client == nil {
client = DefaultHttpClient
}
httpHeader := map[string][]string{}
httpHeader := map[string][]string{"Content-Type": []string{"application/x-thrift"}}
return &THttpClient{client: client, url: parsedURL, requestBuffer: bytes.NewBuffer(buf), header: httpHeader}, nil
}