Added request URL to reply data
authorAlexander Ebert <ebert@woltlab.com>
Fri, 12 Jul 2013 16:43:23 +0000 (18:43 +0200)
committerAlexander Ebert <ebert@woltlab.com>
Fri, 12 Jul 2013 16:43:23 +0000 (18:43 +0200)
Closes #1409

wcfsetup/install/files/lib/util/HTTPRequest.class.php

index 3c163a4fa549ba7f0a7368a6a0da25b068f57945..c341794c6b17124962f893cd08eb723d65bb02df 100644 (file)
@@ -62,6 +62,12 @@ final class HTTPRequest {
         */
        private $query;
        
+       /**
+        * request URL
+        * @var string
+        */
+       private $url = '';
+       
        /**
         * request headers
         * @var array<string>
@@ -121,6 +127,8 @@ final class HTTPRequest {
         * @param       string          $url
         */
        private function setURL($url) {
+               $this->url = $url;
+               
                if (PROXY_SERVER_HTTP) {
                        $parsedUrl = parse_url(PROXY_SERVER_HTTP);
                        $this->path = $url;
@@ -278,7 +286,8 @@ final class HTTPRequest {
                return array(
                        'statusCode' => $this->statusCode, 
                        'headers' => $this->replyHeaders, 
-                       'body' => $this->replyBody
+                       'body' => $this->replyBody,
+                       'url' => $this->url
                );
        }