Project

General

Profile

Actions

Bug #234

closed

Case-sensitive problem with Content-Type

Added by Anonymous over 18 years ago. Updated over 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
core
Target version:
ASK QUESTIONS IN Forums:

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

Actions #1

Updated by jan over 18 years ago

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

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

Actions

Also available in: Atom