The Weight of Grief

This poem talks about the power of grief, and its unmeasurable impact on a person’s life.

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




103 Early Hints

When a client receives these headers, it might immediately start fetching those resource in anticipation of the HTML document using them.

The 103 Early Hints status code can move those headers up even earlier.

A response to a HTTP GET request might then look like this:

This GET request got 2 responses The 103 Early Hints status codes were in this case sent as soon as the server could, while the real response (with 200 OK) took a bit longer to produce. This could allow a client to quickly fetch these additional resources.

Another use-case for this might be a HTTP/2-enabled proxy or CDN. This CDN might be able to read these 103 responses and turn the preload links into HTTP/2 pushes.

Any header sent with the 103 status codes should be treated just as hints, and might not be ‘correct’. Only once you get the final status code, a client can find out what the real headers should have been.

For that reason any headers supplied in the 103 should not cause any changes to how the real responses were interpreted.

The 2 languages I looked at for using this status were PHP and Node.js. PHP does not support 103 Early Hints, because it doesn’t have a native ability to send more than 1 status code back to a client.

Node.js does support it. The HTTP/1 version looks like this (and looks a bit like a hack, as it uses a private function):

The HTTP/2 library has a vetted public API.

This proposal predates 103 Early Hints and proposed using the status for 103 Checkpoint, which could be used to occasionally send the client some information about how many bytes the server had received thusfar.

We know now that 103 Checkpoint never became standard. Yet, it seems pretty useful. I think most applications that require resumable uploads, tend to now do so by splitting up large files in many chunks and using many HTTP requests to do the upload. This doesn’t feel as elegant to me.

Add a comment

Related posts:

Notas sobre florestas e formas

Estar sem querer significar. “Notas sobre florestas e formas” is published by Dino Siwek.

Creating OAuth2.0 access token using Apigee

We have a back-end server already running REST micro-service in any language framework. We have GET / POST APIs ready to be consumer by the consumer but we need to have authentication and…

Advent Avoidance

The darkness of my Advent is from my own eyes closed;. “Advent Avoidance” is published by Amie Tara Brodie.