Project

General

Profile

Bug #234

Case-sensitive problem with Content-Type

Added by Anonymous over 13 years ago. Updated over 11 years ago.

Status:
Fixed
Priority:
Normal
Assignee:
-
Category:
core
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Missing in 1.5.x:

Description

Though I have


  ".jpg"          =>      "image/jpeg",
  ".jpeg"         =>      "image/jpeg",

in my lighttpd.conf, there was a problem when an image was using capital letters in its file extension. lighttpd was sending Content-Type: application/octet-stream then. The result - at least using Firefox - was that the image had to be saved, there was no way to get it displayed in Firefox.

e.g.: test.jpg was displayed correctly while test.JPG wasn't

I think that changing:


if (0 == strncmp(b1->ptr + b1->used - 1 - len, 

to:


if (0 == strncasecmp(b1->ptr + b1->used - 1 - len, 

in buffer.c fixed the problem. However I'm not really an expert and don't know if there might be any sideeffects or something by doing so.

Maybe someone with more experience can have a look at this problem.

Thanks
mlx

-- lighttpd

History

#1

Updated by jan over 13 years ago

  • Status changed from New to Fixed
  • Resolution set to fixed

thanks for this reports, a fix has been commited in r632

Also available in: Atom