Re: HTTP faking

2007-04-12 Thread [EMAIL PROTECTED]
Ben, > the middleware can handle the transformation. I think that is a good next step for the response to be updated. > > I can put this on djangosnippets, but since you're the original author > I figured I'd give you the opportunity first. > Please feel free, what I wrote is pretty trivial.

Re: HTTP faking

2007-04-12 Thread Benjamin Slavin
Jesse, I think that this is a decent idea. One thing that I think would be useful though is for this sort of transform to be transparent... that way templates can be constructed properly and the middleware can handle the transformation. I've put together a quick example combining your code and

Re: HTTP faking

2007-04-12 Thread Tim Chase
>> Yes, I can see that, but PUT is idempotent, while POST >> isn't. It seems to me that treating one verb as another >> will at least make HTTP caching odd. > > None of PUT/POST/DELETE are cacheable (with the exception of > POST with Expires or Cache-Control headers)... so I don't know > that yo

Re: HTTP faking

2007-04-12 Thread Benjamin Slavin
On 4/12/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > Yes, I can see that, but PUT is idempotent, while POST isn't. It > seems to me that treating one verb as another will at least make HTTP > caching odd. None of PUT/POST/DELETE are cacheable (with the exception of POST with Expires or Cache-

Re: HTTP faking

2007-04-12 Thread Jeremy Dunck
On 4/12/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I think the idea is to embrace the value of the HTTP methods (the > standard) even in an imperfect world. So, while IE might not support > a form with method "PUT", we can provide a band-aid that will let a > non-compliant browser work

Re: HTTP faking

2007-04-12 Thread [EMAIL PROTECTED]
I think the idea is to embrace the value of the HTTP methods (the standard) even in an imperfect world. So, while IE might not support a form with method "PUT", we can provide a band-aid that will let a non-compliant browser work while offering seemless functionality for browsers that do. jll O

Re: HTTP faking

2007-04-12 Thread Jeremy Dunck
On 4/12/07, Jesse Lovelace <[EMAIL PROTECTED]> wrote: > I've been interested in the idea of faking HTTP methods that > browsers/servers might not support I'm not sure I understand the motivation to munge the request from the browser to use different verbs. Surely if you're inspecting a particula

HTTP faking

2007-04-12 Thread Jesse Lovelace
Hi all, I've been interested in the idea of faking HTTP methods that browsers/servers might not support like the rails people are doing in 1.2 so I've written a very minimal middleware to do this--if someone else has done this already sorry for the repetition. (It does the method faking using a p