Remix.run Logo
cosmotic 3 hours ago

Why not just define the semantics of a GET request body?

advisedwang 3 hours ago | parent | next [-]

There's countless proxies in the wild that would not behave correctly with an RFC-defined GET-with-body, and there's no way for a client to know if that's the case.

QUERY has the advantage of getting default behaviour from most proxies (which at least is well behaved even if inefficient). If there are any proxies that just drop QUERY requests, at least they won't silently mangle the request.

This is the same way that instead of improving how HTTP 301 was specified, HTTP 308 was created. It's a pragmatic move.

chadgpt3 3 hours ago | parent | prev [-]

Proxies often delete it

elAhmo 3 hours ago | parent [-]

They could be updated to not delete it, like they would require for this new method anyway.

moralestapia 3 hours ago | parent [-]

Agree.

They should not delete the body in the first place.

jerf an hour ago | parent | next [-]

If we're going to play the "should" game, whatever originated the body "shouldn't" have because the spec says that's illegal.

Although we could also go with, a proxy shouldn't delete the body, it "should" reject the request outright as ill-formed.

The meta-point I'm making here, which I'm sure will be missed if I don't spell it out, is that if we're going to talk about what "should" be done when it is explicily out of the scope of a standard, there's no way around the fact that there are multiple completely sensible ways to extend the standard and there's every reason to expect that in the real world people aren't going to agree. Sometimes they manage to, but even then often quite imperfectly. Our human intuitions that standards are something that are "built" is perhaps not wrong, but you can also productively look at standards as taking the raw material of all possible things two systems could send to each other and removing possibilities. If you reach into a space that has been explicitly removed, you can't expect everyone else to do so in exactly the same way you will.

flufluflufluffy 2 hours ago | parent | prev [-]

The HTTP standard does not define a body for GET requests. Therefore, proxy implementations will typically only copy the data from the request header when sending it off to its next destination. They don’t technically “delete” anything. This saves compute (and possibly bandwidth, if the request happened to have a body, although the whole point is that one can safely assume a GET request does not have a body per the standard).