[erlang-questions] Static files served through Webmachine
Tue Jul 19 05:49:35 CEST 2011
> I'm not familiar with Rails doing .json/.html. My understand was Rails used
> urls like I was wanting to use: domain.com/user/<user-id> -- no .html. Do
> you mean something else where they use .json/.html?
Rails will parse the extension as the format, and defaults to HTML I
believe. So calling /users/1.xml for example would do an XML dump of
the dump. Similarly, you can do this for .json as well (but by default
I think it does html and xml).
This is redundant information due to this information being in HTTP
headers preferably, but I think they did it as a practical solution
for XMLHttpRequest, which has a limited ability to set headers.
But if you did add such a thing, then nginx can easily proxy one and
not the other or vice versa.
More information about the erlang-questions