Hello, since Flash/Flex only supports GET/POST, I had to implement this. I think it might be of interest to others.

CommentFileSizeAuthor
X-HTTP-Method-Override.patch496 byteswedge

Comments

gdd’s picture

This is not a bad idea. Some firewalls block everything but POST and GET apparently as well.

ygerasimov’s picture

I think it is quite nice idea as well. Even I would substitute the code

     if ($method=='POST' && (isset($_GET['_method']) && $_GET['_method'])) {
       $method = $_GET['_method'];
     }

With code proposed by wedge as it looks like it is more common way to override method if we can't use it directly.

if ($method=='POST' && isset($_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'])) {
  $method = $_SERVER['HTTP_X_HTTP_METHOD_OVERRIDE'];
}
voxpelli’s picture

@ygerasimov: If we find this header to be of common use then we should support both methods as some people might not be able to easily change headers or not know how to change them. Removing $_GET['_method'] would also break compatibility - no reason to do so.

ygerasimov’s picture

Status: Active » Reviewed & tested by the community

Alright. Lets support several ways of "switching" the method.

Setting this issue to reviewed.

kylebrowning’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.