|
|
@ -131,10 +131,19 @@ func (proxy *Proxy) ServeHTTP(res http.ResponseWriter, req *http.Request) {
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|
logErr(log, err)
|
|
|
|
logErr(log, err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else if response.Body != nil && len(response.Body) > 0 {
|
|
|
|
}
|
|
|
|
_, err := res.Write(response.Body)
|
|
|
|
if response.Body != nil {
|
|
|
|
if err != nil {
|
|
|
|
if response.BodyReader != nil {
|
|
|
|
logErr(log, err)
|
|
|
|
_, err := io.Copy(res, response.BodyReader)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
logErr(log, err)
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if len(response.Body) > 0 {
|
|
|
|
|
|
|
|
_, err := res.Write(response.Body)
|
|
|
|
|
|
|
|
if err != nil {
|
|
|
|
|
|
|
|
logErr(log, err)
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|