From 16575ecbe352c05b70ba8a9fd091acd2069dee25 Mon Sep 17 00:00:00 2001 From: petter Date: Mon, 23 Feb 2009 13:42:32 +0000 Subject: [PATCH] Fixed issue with response not containing correct headers. CSS was sent as text/plain, causing firefox to ignore it. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@3813 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-tools/webgui/start.pl | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/varnish-tools/webgui/start.pl b/varnish-tools/webgui/start.pl index 7a23be15..c51bd2e9 100755 --- a/varnish-tools/webgui/start.pl +++ b/varnish-tools/webgui/start.pl @@ -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; } -- 2.39.5