New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
net/http/httptrace: redirections make it hard to use the hooks #17152
Comments
CL https://golang.org/cl/29376 mentions this issue. |
Instead of documenting something overly-vague like they can be called more than once, I'd rather say that it's a /cc @tombergan for thoughts. |
I like the way you put it, and I will try to update the godoc representing more of the scope of the tracing. It would be nice to demonstrate a case with redirection to document the usage with The example I recently contributed does a Client.Do which might be misleading. We should, at least, modify it before we cut 1.8. |
SGTM. And any other examples/docs until Client if so. |
CL https://golang.org/cl/29431 mentions this issue. |
Tracing happens at the http.Trace level. Fix the example to demostrate tracing in the lifecycle of a RoundTrip. Updates #17152. Change-Id: Ic7d7bcc550176189206185482e8962dbf1504ff1 Reviewed-on: https://go-review.googlesource.com/29431 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
…round trip Updates golang#17152. Change-Id: Iad357cae2534978d4def4f5f4a0efa68ae462acb
CL https://golang.org/cl/29685 mentions this issue. |
This sentence is partially guilty why httptrace is considered as an http.Client tracing package. Removing the mention. Updates #17152. Change-Id: I69f78a6e10817db933f44e464a949ae896e44ec6 Reviewed-on: https://go-review.googlesource.com/29755 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Updates golang/go#17152. Change-Id: I08d4174ba62f6dc4028bd17a911b92fc373b81e4 Reviewed-on: https://go-review.googlesource.com/29685 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Reviewed-by: Andrew Gerrand <adg@golang.org>
I am going to close this bug given we published a blog post how to use the package. I don't think we should try to verbally explain the same points in the godoc. Warning about the ClientTrace is bound to RoundTripper and giving a link to the blog post might be better. |
@rakyll, you said you were going to close this bug but didn't. The rationale sounds fine provided you add a link to the blog post from the httptrace package doc. I don't see the link there now. Thanks. |
CL https://golang.org/cl/32117 mentions this issue. |
Consider the following program:
https://google.com is redirected to https://www.google.com and making it harder to use the DNS hooks because DNSDoneInfo doesn't contain any information about the host it is trying to resolve.
It is also not documented anywhere that these hooks might be called more than once.
Should we think about a way to report the redirection or include enough details, so the user can determine for which actual request, the hooks are being invoked?
/cc @bradfitz
The text was updated successfully, but these errors were encountered: