From c0437443dc72784e1074dfc71649f49560d4b650 Mon Sep 17 00:00:00 2001 From: Tobias Schlitt Date: Mon, 9 Apr 2012 17:09:14 +0200 Subject: [PATCH] Implemented: Use property handler for method extraction. This allows custom setups with overriding of HTTP method. --- src/main/Qafoo/RMF/Request/HTTP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/Qafoo/RMF/Request/HTTP.php b/src/main/Qafoo/RMF/Request/HTTP.php index 0d0ef35..cc58795 100644 --- a/src/main/Qafoo/RMF/Request/HTTP.php +++ b/src/main/Qafoo/RMF/Request/HTTP.php @@ -32,10 +32,10 @@ class HTTP extends Request */ public function __construct( array $handlers = array() ) { - $this->contents['method'] = $_SERVER['REQUEST_METHOD']; $this->contents['path'] = $_SERVER['REQUEST_URI']; $this->contents['variables'] = $_GET; + $this->addHandler( 'method', new Request\PropertyHandler\Server( 'HTTP_METHOD' ) ); $this->addHandler( 'language', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_LANGUAGE', 'en' ) ); $this->addHandler( 'encoding', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_CHARSET', 'utf-8' ) ); $this->addHandler( 'compression', new Request\PropertyHandler\AcceptHeader( 'HTTP_ACCEPT_ENCODING', 'identity' ) );