Skip to content

Use status instead of statusText#3515

Merged
mshibuya merged 1 commit into
railsadminteam:masterfrom
fuegas:statustext-http2
May 4, 2022
Merged

Use status instead of statusText#3515
mshibuya merged 1 commit into
railsadminteam:masterfrom
fuegas:statustext-http2

Conversation

@fuegas

@fuegas fuegas commented May 2, 2022

Copy link
Copy Markdown
Contributor

As of HTTP/2 the field statusText can be empty ( See: jquery/api.jquery.com@be6de73 ). Thus the field statusText is no longer relyable to base logic on. The field status of the XMLHttpRequest remains intact, so we can base the logic on that field.

We encountered this problem during testing of RailsAdmin 3.0 on local development environments versus acceptance environments. On the acceptance environments the success events wouldn't be fired anymore because the statusText was empty and thus the check status == "OK" always returned false.

As of HTTP/2 the field statusText can be empty ( See: jquery/api.jquery.com@be6de73 ). Thus the field statusText is no longer relyable to base logic on. The field status of the XMLHttpRequest remains intact, so we can base the logic on that field.
@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage decreased (-5.4%) to 90.547% when pulling deecd07 on fuegas:statustext-http2 into 7301d9b on railsadminteam:master.

@mshibuya mshibuya merged commit 2ee7899 into railsadminteam:master May 4, 2022
@mshibuya

mshibuya commented May 4, 2022

Copy link
Copy Markdown
Member

Looks good, thanks!

@fuegas fuegas deleted the statustext-http2 branch May 4, 2022 10:29
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.

3 participants