Committer: gprochaev
Fix content-type header for userheadsU trunk/cgi-bin/Apache/LiveJournal.pm
Modified: trunk/cgi-bin/Apache/LiveJournal.pm =================================================================== --- trunk/cgi-bin/Apache/LiveJournal.pm 2010-09-22 03:16:19 UTC (rev 17426) +++ trunk/cgi-bin/Apache/LiveJournal.pm 2010-09-22 06:50:23 UTC (rev 17427) @@ -1423,7 +1423,10 @@ LJ::Request->header_out('X-REPROXY-FILE', $paths->[0]); } - LJ::Request->content_type ($result->{mime_type}); + my $mime_type = $result->{mime_type}; + $mime_type ||= 'image/gif' if $uri =~ m|^/userhead/\d+|; ## default for userheads + + LJ::Request->content_type ($mime_type); LJ::Request->header_out("Content-length", $size); LJ::Request->header_out("Cache-Control", "no-transform"); LJ::Request->header_out("Last-Modified", LJ::TimeUtil->time_to_http ($result->{change_time}));