We're talking about the check in CommonMiddleware right? Since it's done 
only if DEBUG is True, it seems to serve mostly as a courtesy to alert 
developers of the inability of redirects being able to preserve POST data. 
Thinking about it a bit more, as far as I know, DELETE requests don't 
typically include any data so does this same issue exist there? That said, 
for API requests I don't think a developer would consciously send a request 
to an endpoint that required a redirect, so I think it's fine to warn for 
both PUT and DELETE.

On Friday, June 27, 2014 3:14:02 PM UTC-4, Phill Tornroth wrote:
>
> > No, I don't think it's intentional -- more that Django wasn't initially 
> built with REST APIs in mind.
>
> Makes sense. So would a pull request that includes tests and subjects 
> PUT/DELETE to the same behavior as APPEND_SLASH be appreciated? I 
> understand it's technically a breaking change, and some users could be 
> dependent on the redirect functionality for PUT or DELETE currently, but I 
> think that'd be fairly rare given that POST has been 500ing.
>
> On Friday, June 27, 2014 11:13:10 AM UTC-7, Phill Tornroth wrote:
>>
>> Ran into this recently and it seemed counterintuitive. The APPEND_SLASH 
>> functionality 500's for POST, but returns a 302 for PUT (and I assume 
>> DELETE after looking at the source). Is that intentional? It surprised me 
>> that POST/PUT/DELETE wouldn't all share behavior in this case.
>>
>> Thanks in advance,
>> Phill
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/cab66c7a-55d1-47bc-b582-8243a7979f5c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to