Skip to content

Would receive status 200 even when no connection or cors erro ona local page #12138

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: development
Choose a base branch
from

Conversation

Shallowmallow
Copy link
Contributor

like ( file:///blabla/build/html5/index.html )

Even though there was no data, the status would be 200
@Simn
Copy link
Member

Simn commented Apr 5, 2025

We shouldn't have to convert this to Bytes only to do a length == 0 check.

@Shallowmallow
Copy link
Contributor Author

r.response.length is null
but maybe we could do cast(r.response, ArrayBuffer).byteLength == 0 ?

@Simn
Copy link
Member

Simn commented Apr 6, 2025

Isn't r.response typed as an ArrayBuffer already anyway? In that case a simple r.response.byteLength check should do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants