| From | Sent On | Attachments |
|---|---|---|
| Nuno Magalhães | Jul 26, 2009 1:08 pm | |
| Igor Sysoev | Jul 26, 2009 11:19 pm | |
| Nuno Magalhães | Jul 27, 2009 4:39 am | |
| Nuno Magalhães | Jul 27, 2009 5:25 am | |
| Jeff Waugh | Jul 27, 2009 5:17 pm | |
| climbor | Jul 27, 2009 7:20 pm | |
| Igor Sysoev | Jul 28, 2009 12:01 am | |
| Jeff Waugh | Jul 28, 2009 12:37 am | |
| Nuno Magalhães | Jul 28, 2009 6:10 am | |
| Juan Fco. Giordana | Jul 29, 2009 1:15 am | |
| Maxim Dounin | Jul 29, 2009 4:01 am | |
| Nuno Magalhães | Jul 29, 2009 6:47 am | |
| Marcus Clyne | Jul 29, 2009 7:47 am |
| Subject: | Re: Content negotiation? | |
|---|---|---|
| From: | Marcus Clyne (macc...@gmail.com) | |
| Date: | Jul 29, 2009 7:47:31 am | |
| List: | ru.sysoev.nginx | |
Hi,
Nuno Magalhães wrote:
It should be relatively simple to write module with such capabilities. And I believe somebody already did this, at least something with name "Accept Language Module" is listed on wiki.nginx.org:
Unless the code has been updated recently, there are some bugs with the code which would prevent it doing what it's supposed to (though the fixes are easy).
A few months ago I wrote a more advanced language-negotiation module that checked for a POST variable, a cookie and then the Accept-Language header (in that order) for language info, and set a cookie afterwards if not already set.
I'm thinking about adding MIME negotiation too. (e.g. being able to switch between gif, png, svg).
I'm working on other stuff right now, but could check that it's working and publish it if people are interested.
Any other requests?
Note that you can currently do content negotiation using if (...) statements and regexes on $http_ variables - incorporating them into a module would probably just speed things up a bit.
Marcus.





