ttfb icon indicating copy to clipboard operation
ttfb copied to clipboard

also add content download time (requires http/1.1 header parsing)

Open phip1611 opened this issue 4 years ago • 4 comments

will be more complicated, because it needs HTTP header parsing.. content encoding could be chunked for example..

I need to know the contents length, because the "read_to_end" (EOF) doesn't work well. Some servers even do not send the EOF (program gets stuck)

phip1611 avatar Jul 09 '21 14:07 phip1611

Hey there!

Firstly, great work on the library. It's been incredibly useful so far. Is there any plans to implement this feature at some point? It would complete the main HTTP timings and it would be incredibly useful :)

GenericNerd avatar Apr 06 '24 01:04 GenericNerd

Hey. Thanks for the interest in my library.

Generally speaking, I'd love to have full HTTP/1.1, HTTP/2.0, and HTTP/3.0 support. However, for the nature of the library, I need a more low-level access to the corresponding implementations which I'm not sure yet all popular crates for HTTP 1/2/3 offer.

Further, those protocol implementations on top of the TLS stream need to provide me with the following functionality:

  • fetch first byte
  • fetch all data

I think it might be possible if the corresponding protocol libraries offer the proper abstractions. I try looking into it in the next 14 days.

phip1611 avatar Apr 07 '24 18:04 phip1611

Hiya there! Any updates?

GenericNerd avatar Apr 25 '24 00:04 GenericNerd

I'm sorry to tell you that, but I do not have the capacity to work on this, at least in the next two months.

I'm open for (good) pull requests/contributions tho.

I think a way forward is to properly implement a Http/1.1, HTTP/2, and HTTP/3 (see #35) API adapter compatible with the current connector-style code. This adapter must enable it to load the first byte separately from the full resource.

phip1611 avatar Apr 28 '24 20:04 phip1611