hi guys, When i was doing a http api performance benchmark, i found a lot of connections of status of "TIME_WAIT". I have tried to change the value of Transport.MaxConnsPerHost, but still not working. After a long time debuging, i finally found that api response header contains " Connection: close", so that the connection was closed. But when i dump the request and response with httputil.DumpResponse, i cannot see the "Connection: close" header. This is weird!
After read the source code, i found that last parameter of function "http.shouldClose", removeCloseHeader was set to true when target is response. Once headers contains "Connection: close", the header will be removed. so my question is, what's the purpose of the design. leaving the header exists will be be helpful for debuging, why remove it? thanks a lot if someone could answer my doubts. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/5256b1c7-d7e7-4093-8c16-ff4baa70cb20n%40googlegroups.com.