Skip to content

Change Response's statusText's default#836

Merged
annevk merged 1 commit intomasterfrom
annevk/change-default-Response-statusText
Nov 21, 2018
Merged

Change Response's statusText's default#836
annevk merged 1 commit intomasterfrom
annevk/change-default-Response-statusText

Conversation

@annevk
Copy link
Copy Markdown
Member

@annevk annevk commented Nov 20, 2018

The empty string is a better default as the field is optional in HTTP and rather meaningless. This way if you change the status and forget about statusText it won't give the mistaken impression things are OK.

Tests: ...

Fixes #698.


Preview | Diff

The empty string is a better default as the field is optional in HTTP and rather meaningless. This way if you change the status and forget about statusText it won't give the mistaken impression things are OK.

Tests: ...

Fixes #698.
annevk added a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2018
See whatwg/fetch#836 for context.

This also cleans up the code a bit.
@annevk
Copy link
Copy Markdown
Member Author

annevk commented Nov 20, 2018

@youennf @yutakahirano what do you think? With browser bugs this is reasonable to do? It's an API change, but extremely minor.

@domfarolino
Copy link
Copy Markdown
Member

FWIW I also think this makes sense, but do wonder how much potentially older JS out there is relying on "OK".

Ms2ger pushed a commit to web-platform-tests/wpt that referenced this pull request Nov 20, 2018
See whatwg/fetch#836 for context.

This also cleans up the code a bit.
@annevk
Copy link
Copy Markdown
Member Author

annevk commented Nov 20, 2018

It seems unlikely given this only affects synthetic responses and you'd generally not check this field (or set it), but yes.

@domfarolino
Copy link
Copy Markdown
Member

Oh that's right, good point.

@annevk annevk merged commit a3d423f into master Nov 21, 2018
@annevk annevk deleted the annevk/change-default-Response-statusText branch November 21, 2018 11:27
@jdm
Copy link
Copy Markdown
Member

jdm commented Nov 21, 2018

servo/servo#22238

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 26, 2018
…fault, a=testonly

Automatic update from web-platform-testsFetch: change Response's statusText's default

See whatwg/fetch#836 for context.

This also cleans up the code a bit.

--

wpt-commits: 99e9e996267ccd5c1344b7d0164c5e5763b3b174
wpt-pr: 14144
jankeromnes pushed a commit to jankeromnes/gecko that referenced this pull request Nov 27, 2018
…fault, a=testonly

Automatic update from web-platform-testsFetch: change Response's statusText's default

See whatwg/fetch#836 for context.

This also cleans up the code a bit.

--

wpt-commits: 99e9e996267ccd5c1344b7d0164c5e5763b3b174
wpt-pr: 14144
aarongable pushed a commit to chromium/chromium that referenced this pull request Nov 30, 2018
From "OK" => "", as per the spec change
whatwg/fetch#836.

R=yhirano@chromium.org, yoav@yoav.ws

Bug: 907441
Change-Id: Id58718ecdba49432078358c20d62df5ff0eda8f8
Reviewed-on: https://chromium-review.googlesource.com/c/1348739
Commit-Queue: Dominic Farolino <domfarolino@gmail.com>
Reviewed-by: Yutaka Hirano <yhirano@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612662}
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
…fault, a=testonly

Automatic update from web-platform-testsFetch: change Response's statusText's default

See whatwg/fetch#836 for context.

This also cleans up the code a bit.

--

wpt-commits: 99e9e996267ccd5c1344b7d0164c5e5763b3b174
wpt-pr: 14144

UltraBlame original commit: 823f8312186515b6e7a6860306bb8d1f8e838cc8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
…fault, a=testonly

Automatic update from web-platform-testsFetch: change Response's statusText's default

See whatwg/fetch#836 for context.

This also cleans up the code a bit.

--

wpt-commits: 99e9e996267ccd5c1344b7d0164c5e5763b3b174
wpt-pr: 14144

UltraBlame original commit: 823f8312186515b6e7a6860306bb8d1f8e838cc8
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
…fault, a=testonly

Automatic update from web-platform-testsFetch: change Response's statusText's default

See whatwg/fetch#836 for context.

This also cleans up the code a bit.

--

wpt-commits: 99e9e996267ccd5c1344b7d0164c5e5763b3b174
wpt-pr: 14144

UltraBlame original commit: 823f8312186515b6e7a6860306bb8d1f8e838cc8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants