net/http: using DumpResponse without requests #29658
Closed
Labels
Comments
Nope, those aren't preserved. You'll need to do something lower-level with the net package directly if you need that. |
So is there anyway to get the HTTP message total length when using ReadResponse? |
There are various definitions for "total length". Which do you mean? |
Sum of all TCP payloads that represent the current HTTP message |
Nope, sorry. That isn't tracked. You might be able to recreate a close value, but optional whitespace and such is discarded. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Hi,
I'm trying to build a HTTP sniffer.
I used http.ReadResponse as following
but some parts of the response are missing such as the delimiters
I would like to dump the raw response, is it possible to use httputil.DumpResponse?
Samuel
The text was updated successfully, but these errors were encountered: