r3813 - trunk/varnish-tools/webgui

petter at projects.linpro.no petter at projects.linpro.no
Mon Feb 23 14:42:32 CET 2009


Author: petter
Date: 2009-02-23 14:42:32 +0100 (Mon, 23 Feb 2009)
New Revision: 3813

Modified:
   trunk/varnish-tools/webgui/start.pl
Log:
Fixed issue with response not containing correct headers. CSS was sent as text/plain, causing firefox to ignore it. 


Modified: trunk/varnish-tools/webgui/start.pl
===================================================================
--- trunk/varnish-tools/webgui/start.pl	2009-02-23 12:44:13 UTC (rev 3812)
+++ trunk/varnish-tools/webgui/start.pl	2009-02-23 13:42:32 UTC (rev 3813)
@@ -75,10 +75,19 @@
 		$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;
 		}



More information about the varnish-commit mailing list