matthew-andrews / isomorphic-fetch

Isomorphic WHATWG Fetch API, for Node & Browserify
MIT License
6.95k stars 289 forks source link

Server HTTP 500 - response body missing #148

Closed wrinkledcheese closed 6 years ago

wrinkledcheese commented 6 years ago

I have a React/Redux app which I'm going to the server for async data using isomorphic-fetch, provided by npm.

I get an internal server error from the API indicating something is improperly configured on the back end.

When I send my request via fetch(), I get the response headers, which do indicate a content-length of 102. My issue is that the response body is not present.

If I copy and paste the URL out of the request headers and paste them into Google Chrome, I get the identical response, however, the response body is present. Which from reading RFC 7230 and RFC 7231 ( HTTP message body and HTTP method semantics respectively ), it should have a body. Unlike Request Body with GET methods, it doesn't mention "might break existing implementations".

Samuyi commented 6 years ago

i get the same error

wrinkledcheese commented 6 years ago

I did some more research and this has nothing to do with isomorphic fetch, nor the underlying browser implementation. The 7230 family of RFCs are NOT the accepted HTTP 1.1 standard. The accepted standard is 2616, still.

https://tools.ietf.org/html/std1 page 9 May 2008. The standard for HTTP 1.1 still references RFC 2616.