Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread s4mmael
Thank you, I'll do my best. среда, 23 июля 2014 г., 18:06:35 UTC+4 пользователь Aymeric Augustin написал: > > Edit - apparently, IE is following suit. > > My answer still stands: since there’s no advantage to implementing such an > API in Django rather than in a third-party library, it should

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread Aymeric Augustin
Edit - apparently, IE is following suit. My answer still stands: since there’s no advantage to implementing such an API in Django rather than in a third-party library, it should live as third-party code first. -- Aymeric. On 23 juil. 2014, at 15:56, Aymeric Augustin wrote: > Hello, > >

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread Aymeric Augustin
Hello, Before we can consider some code for inclusion into Django, you must demonstrate widespread use. Since support was announced in Firefox just two days ago, it’s too early to have that discussion. We don’t even know what IE will do. Maybe it'll just kill this initiative like it killed DNT.

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread s4mmael
Matthew, thank you, great idea. There are already many standard decorators in django.views.decorators. Maybe the one that redirects to a particular page or just returns 403 HTTP response in case safe browsing is requested can be useful as well. среда, 23 июля 2014 г., 17:20:10 UTC+4 пользовател

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread Matthew Lauber
Possibly, write it up as a decorator? On Wed, Jul 23, 2014 at 9:05 AM, wrote: > Florian, thank you for your answer. > I'm totally fine with Request.META['prefer'], it seems to be a > straightforward solution. However, checking this dictionary in each view > that supports this feature and also a

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread s4mmael
Florian, thank you for your answer. I'm totally fine with Request.META['prefer'], it seems to be a straightforward solution. However, checking this dictionary in each view that supports this feature and also adding "Vary: Prefer" to response headers seems to be a little odd and inconvinient. I t

Re: [New feature request] Prefer:Safe request header

2014-07-23 Thread Florian Apolloner
Hi, On Wednesday, July 23, 2014 1:58:26 PM UTC+2, S4mmael wrote: > > It would be really nice to have some mechanism intended to work with this > header in Django. A kind of miidleware or a decorator maybe. > What's wrong with "if request.META.get('prefer') == 'safe'"? Cheers, Florian -- You

[New feature request] Prefer:Safe request header

2014-07-23 Thread S4mmael
Hello, "Prefer:Safe" request header is a new feature of IE and Firefox, it is also implemented in Chromium via plugin. This feature connects parental controls enabled on Mac OS and Windows with the sites they visit online via their browser. Web-browser sends HTTP header "Prefer:Safe" to web-applic