I don't necessarily think this is even breaking the HTTP standard. While '+' should not be interpreted as spaces as part of a URL while it's being treated as a URL , the HTTP spec doesn't specify / care what file that may map to on a server. Edit: As mentioned below, this isn't correct since URLs should be able to be escaped and return the same resource, and an escaped + differs from an unescaped + on S3.
Exactly! The OP's point is summarized in this sentence: > My point is that the spec requires + to be escaped only inside the querystring. So what? What the standard mandates for query strings is irrelevant here. It's up to the server how to interpret and map the URLs. "Unconventional and unfortunate" - yes, but breaking the HTTP spec? No.
S3: Plus sign is interpreted as space in the path part of URLs
21–30 of 49 posts
Re: S3: Plus sign is interpreted as space in the path part of URLs
#22URLs and URIs have separate standards from HTTP and they have changed over time (been replaced by newer ones).
Many years ago it was common to encode a space as a + sign. For example, the PHP function urlencode[1] does the same thing with a + sign. If you're a PHP user, don't use this function unless you know you need to. There are better functions now.
Re: S3: Plus sign is interpreted as space in the path part of URLs
#23Re: S3: Plus sign is interpreted as space in the path part of URLs
#24I don't necessarily think this is even breaking the HTTP standard. While '+' should not be interpreted as spaces as part of a URL while it's being treated as a URL , the HTTP spec doesn't specify / care what file that may map to on a server. Edit: As mentioned below, this isn't correct since URLs should be able to be escaped and return the same resource, and an escaped + differs from an unescaped + on S3.
Sure but /%2B should resolve to the same thing as /+
Re: S3: Plus sign is interpreted as space in the path part of URLs
#25Earlier quoted context omitted.
To the contrary, I think it's actually a refreshingly honest response. A "corporate bullshit" response would be to ignore it altogether, try to argue it's a feature not a bug, or give a canned statement about how we respect the environment and want the world to be a better place. The AWS support is explicitly acknowledging it's an issue, while giving a rational reason why it probably won't be fixed (even if you disag…
But can they even change it without risking to break tens of thousands of websites?
Re: S3: Plus sign is interpreted as space in the path part of URLs
#26I don't necessarily think this is even breaking the HTTP standard. While '+' should not be interpreted as spaces as part of a URL while it's being treated as a URL , the HTTP spec doesn't specify / care what file that may map to on a server. Edit: As mentioned below, this isn't correct since URLs should be able to be escaped and return the same resource, and an escaped + differs from an unescaped + on S3.
Exactly! The OP's point is summarized in this sentence: > My point is that the spec requires + to be escaped only inside the querystring. So what? What the standard mandates for query strings is irrelevant here. It's up to the server how to interpret and map the URLs. "Unconventional and unfortunate" - yes, but breaking the HTTP spec? No.
Re: S3: Plus sign is interpreted as space in the path part of URLs
#27Earlier quoted context omitted.
But can they even change it without risking to break tens of thousands of websites?
They could, by versioning the API (e.g. add a /v2/ to all paths), but that would benefit no-one and should only be done alongside any number of much more important changes.
Re: S3: Plus sign is interpreted as space in the path part of URLs
#28Earlier quoted context omitted.
I'm not familiar with how S3 works in detail, but I imagine this could require additional API calls in the backend which increases the latency and resource usage of API requests. In the worst case, such a change could easily require Amazon to purchase dozens, if not hundreds of additional servers.
With the rate of AWS growth, they probably bought dozens more servers in the time it took you to write out your response. :)
Re: S3: Plus sign is interpreted as space in the path part of URLs
#29&tldr; A legacy behavior is to treat + as a space. When you've been around you need to keep backwards compatibility. URLs and URIs have separate standards from HTTP and they have changed over time (been replaced by newer ones). Many years ago it was common to encode a space as a + sign. For example, the PHP function urlencode[1] does the same thing with a + sign. If you're a PHP user, don't use this function unless y…
Re: S3: Plus sign is interpreted as space in the path part of URLs
#30Amazon has a difficult time with the HTTP standard sometimes. Last time I had to touch an AWS project we discovered a bug[1] in the C++ code backing a Java library (sic). They had implemented their own HTTP client, but forgot to add the "Host" header to requests which is required by HTTP 1.1. Interestingly this client sent requests only to their own services, which means that they either released that without testing…
As an anecdote, about 15/20ish years ago I wrote my own webbrowser. Obviously something highly rudimentary albeit browsers were much easier to implement back then anyway. I was too lazy to read the HTTP spec (it was a hobby project and I was young and impatient) so a lot of what I did was trial and error. I too wasn't sending a host header but it took long while before I ran into any sites that rejected my HTTP requests. The web landscape was very different back then though and IPs were plentiful but it just goes to show how servers have coded around bad clients for years.