Why Is The Statustext Of My Xhr Empty?
When I perform an XHR on our production system, the statusText in the response will be an empty string. However, on our development system, the statusText will reflect the status c
Solution 1:
It might be because one server uses HTTP/2, while the other does not. HTTP/2 doesn't have reason phrases anymore.
Solution 2:
Let's look at spec:
HTTP/2 does not define a way to carry the version or reason phrase that is included in an HTTP/1.1 status line.
Solution 3:
Did your production system use HTTPS and your dev system HTTP by any chance?
For some reason on Chrome statusTexts started to return empty as soon as we installed an SSL certificate in our server and url requests started with HTTPS rather than HTTP.
Hence, we made sure to use 'status' rather than 'statusText'.
Post a Comment for "Why Is The Statustext Of My Xhr Empty?"