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
6 otherwise php will do keepalive request, and wait timeout seconds before
7 can return actual response. similar problem does not happen with curl
10 min/lib/Minify/JS/ClosureCompiler.php | 4 ++--
11 1 file changed, 2 insertions(+), 2 deletions(-)
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)
23 protected $_fallbackFunc = null;
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(
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,