Merge pull request #6 from gringofe/header_crash_fix

fixes #5
This commit is contained in:
John Harker 2020-01-04 21:03:04 +00:00 committed by GitHub
commit 3e62c6b813
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -127,6 +127,7 @@ func proxyHandler(response http.ResponseWriter, request *http.Request) {
// Make the request
var proxyRequest http.Request;
proxyRequest.Header = make(http.Header);
proxyRequest.Method = requestData.Method;
proxyRequest.URL, err = url.Parse(requestData.Url);
if(len(requestData.Auth.Username) > 0 && len(requestData.Auth.Password) > 0) {
@ -179,4 +180,4 @@ func headerToArray(header http.Header) (res map[string]string) {
}
return res;
}
}