Merge pull request #11 from gringofe/body-crash-fix
fixes issue #7 by directly assigning body data to proxyRequest.Body
This commit is contained in:
commit
11a6f96857
1 changed files with 2 additions and 3 deletions
|
@ -138,9 +138,8 @@ func proxyHandler(response http.ResponseWriter, request *http.Request) {
|
|||
}
|
||||
|
||||
if(len(requestData.Data) > 0) {
|
||||
var proxyRequestBody []byte;
|
||||
proxyRequestBody, err = ioutil.ReadAll(strings.NewReader(requestData.Data));
|
||||
_, err = proxyRequest.Body.Read(proxyRequestBody);
|
||||
proxyRequest.Body = ioutil.NopCloser(strings.NewReader(requestData.Data));
|
||||
proxyRequest.Body.Close();
|
||||
}
|
||||
|
||||
var client http.Client;
|
||||
|
|
Loading…
Reference in a new issue