Send 100 Continue when ready to receive topic downstream #1010
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What?
🔷 Disable auto sending HTTP 100 Continue
NodeJs auto sends
HTTP 100 Continue
when it is not strictly handled on server.We handle it in other way and send when needed so it is sent twice.
https://nodejs.org/api/http.html#event-checkcontinue
https://github.com/nodejs/node/blob/v18.x-staging/lib/_http_server.js#L1110
🔷 Topic downstream queue update
expect: 100-continue
header in topic downstream endpoint.HTTP 100 Continue
when request can be processed.🔷 Refactoring
Move
TopicRouter
/ServiceDiscovery
types to@scramjet/types
❗ User should wait for
HTTP 100 Continue
and then start to upload data.❗
@scramjet/cli
/@scramjet/api-client
CAN'T listen for100 Continue
as we usenode-fetch
which doesn't supportcontinue
request's event. Data will be sent immediately.If data are sent with no wait for
100 Continue
some bytes can be lost when request is interrupted before we started handling these data.Review checks:
These aspects need to be checked by the reviewer: