Skip to content

Clarify the behaviour of Javascript Validation when we are waiting for the full body #38

@sefeng211

Description

@sefeng211

There is test which expects the window.fetch to be resolved while the server is sending the response. If ORB is compatible with this behaviour, then it means ORB will allow the promise to resolve before it has made its decision about this request, otherwise this test would hang because ORB will wait for the full response indefinitely.

This contradicts to The promise should throw if it's blocked by ORB.

The current spec text for consuming the body stream for ORB is

Fully read response’s body given processBody and processBodyError
Wait for responseBodyBytes to be non-null.

Fully read response’s body given processBody and processBodyError would return a fully read body as promise and responseBodyBytes would be non-null when the full read body promise is resolved. So this is a blocking behaviour (thanks @annevk for clarifying this). However, this blocking behaviour contradicts to the test that I linked.

Should we allow the promise to be resolved first and only allow the body stream to be consumed if ORB allows this request?

Let me know if I misunderstand something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions