On Wed, Jun 18, 2008 at 4:48 AM, Masklinn <[EMAIL PROTECTED]> wrote:
> On 17 Jun 2008, at 18:34 , Daniel Hepper wrote:
>> This is not how a redirect works. If your view returns a
>> HttpResponseRedirect, Django sends a HTTP 302 code back to the browser
>> along with the new URL. The browser of the user then requests the
>> new URL.
>
> Actually, it should be possible to do it by sending an HTTP 307
> instead of a 302:
>
> * 302 was originally "Moved Temporarily", but implemented the wrong
> way by pretty much every UA. It shouldn't, in fact, be used anymore
> (unless the client only implements HTTP/1.0). Now renamed "Found"

As long as it's not relevant if the UA treats the response as per 303
or per 307 semantics, there's no problem.

> * 303, added in HTTP/1.1, "See Other". Indicates that the response can
> be found at another URI *accessed via GET*

This is sort of true, but not really.  (It's similar to confusing
pointers (in C) or references with values.)

> * 307, added in HTTP/1.1, "Moved Temporarily", indicates that the
> request should be repeated against another URI. This means that a POST
> request receiving a 307 should lead to another POST request with the
> same parameters (note: I'm not sure if you can ask for an alteration
> of the post parameters, but I doubt it)

If the request method is not "safe" (not GET or HEAD), the UA must not
automatically redirect without user confirmation.  This is not a
solution to the original problem.


Arien

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to