]> err.no Git - varnish/commitdiff
Fixed issue with response not containing correct headers. CSS was sent as text/plain...
authorpetter <petter@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 23 Feb 2009 13:42:32 +0000 (13:42 +0000)
committerpetter <petter@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 23 Feb 2009 13:42:32 +0000 (13:42 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3813 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-tools/webgui/start.pl

index 7a23be15501383c1c7ee75f33376d697c8d110e9..c51bd2e987404e92661ca8eb0a1f687e7e28393c 100755 (executable)
@@ -75,10 +75,19 @@ while (my $connection = $daemon->accept) {
                $connection->force_last_request;
 #              print "Request for: " . $request->uri . "\n";
                if ($request->uri =~ m{/(.*?\.png)} ||
-                       $request->uri =~ m{/(.*?\.css)} ||
                        $request->uri =~ m{/(.*?\.ico)}) {
                        my $filename = $1;
                        
+                       $connection->send_file_response($filename);
+                       next REQUEST;
+               }
+               elsif ($request->uri =~ m{/(.*?\.css)}) {
+                       my $filename = $1;
+                       
+                       $connection->send_basic_header();
+                       print $connection "Content-Type: text/css";
+                       $connection->send_crlf();
+                       $connection->send_crlf();
                        $connection->send_file($filename);
                        next REQUEST;
                }