]> git.pld-linux.org Git - packages/minify.git/blob - a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch
up to 2.1.7, securify fix, all users recommended to upgrade
[packages/minify.git] / a82d70b0baaa85c8ca234e39918d678e2b4bea76.patch
1 From a82d70b0baaa85c8ca234e39918d678e2b4bea76 Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
3 Date: Sun, 25 Nov 2012 15:26:28 +0200
4 Subject: [PATCH] use "Connection: close" of file_get_contents
5
6 otherwise php will do keepalive request, and wait timeout seconds before
7 can return actual response. similar problem does not happen with curl
8 backend
9 ---
10  min/lib/Minify/JS/ClosureCompiler.php |    4 ++--
11  1 file changed, 2 insertions(+), 2 deletions(-)
12
13 diff --git a/min/lib/Minify/JS/ClosureCompiler.php b/min/lib/Minify/JS/ClosureCompiler.php
14 index fb474d1..51f7cd1 100644
15 --- a/min/lib/Minify/JS/ClosureCompiler.php
16 +++ b/min/lib/Minify/JS/ClosureCompiler.php
17 @@ -69,7 +69,7 @@ public function min($js)
18          }
19          return $response;
20      }
21 -    
22 +
23      protected $_fallbackFunc = null;
24  
25      protected function _getResponse($postBody)
26 @@ -79,7 +79,7 @@ protected function _getResponse($postBody)
27              $contents = file_get_contents(self::URL, false, stream_context_create(array(
28                  'http' => array(
29                      'method' => 'POST',
30 -                    'header' => 'Content-type: application/x-www-form-urlencoded',
31 +                    'header' => "Content-type: application/x-www-form-urlencoded\r\nConnection: close\r\n",
32                      'content' => $postBody,
33                      'max_redirects' => 0,
34                      'timeout' => 15,
35 -- 
36 1.7.10
37
This page took 0.065267 seconds and 3 git commands to generate.