You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Given that httplib is using http.ClientConn, is it Expected that the library not handle the server closing an idle connection on the client?
Otherwise would a change along the following lines be needed to reconnect,
renaming the original Request() method as request() and then having some
logic for re-trying in the public method?
Given that httplib is using http.ClientConn, is it Expected that the library not handle the server closing an idle connection on the client?
Otherwise would a change along the following lines be needed to reconnect,
renaming the original Request() method as request() and then having some
logic for re-trying in the public method?
func (client _Client) Request(rawurl string, method string, headers map[string]string, body string) (_http.Response, os.Error) {
resp, err := client.request(rawurl, method, headers, body)
if err == io.ErrUnexpectedEOF && (method == "GET" || method == "HEAD") {
if client.conn != nil {
client.conn.Close()
}
client.conn = nil
resp, err = client.request(rawurl, method, headers, body)
}
return resp, err
}
func (client _Client) request(rawurl string, method string, headers map[string]string, body string) (_http.Response, os.Error) {
...
}
The text was updated successfully, but these errors were encountered: