Use 'finally' in HTTPRequest
authorTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Jun 2016 22:44:30 +0000 (00:44 +0200)
committerTim Düsterhus <duesterhus@woltlab.com>
Tue, 28 Jun 2016 22:44:30 +0000 (00:44 +0200)
wcfsetup/install/files/lib/util/HTTPRequest.class.php

index 0f5a295043bda1c79de4452095650ce90724b7c4..7c239438d66e0bf3e8f3f06a1d131859b35c4bd8 100644 (file)
@@ -464,23 +464,14 @@ final class HTTPRequest {
                                
                                try {
                                        $newRequest->execute();
-                                       
-                                       // update data with data from the inner request
-                                       $this->url = $newRequest->url;
-                                       $this->statusCode = $newRequest->statusCode;
-                                       $this->replyHeaders = $newRequest->replyHeaders;
-                                       $this->legacyHeaders = $newRequest->legacyHeaders;
-                                       $this->replyBody = $newRequest->replyBody;
                                }
-                               catch (SystemException $e) {
+                               finally {
                                        // update data with data from the inner request
                                        $this->url = $newRequest->url;
                                        $this->statusCode = $newRequest->statusCode;
                                        $this->replyHeaders = $newRequest->replyHeaders;
                                        $this->legacyHeaders = $newRequest->legacyHeaders;
                                        $this->replyBody = $newRequest->replyBody;
-                                       
-                                       throw $e;
                                }
                                
                                return;