Ticket #234 (closed defect: fixed)

Opened 3 years ago

Last modified 14 months ago

Case-sensitive problem with Content-Type

Reported by: lighttpd@… Owned by: jan
Priority: normal Milestone: 1.4.9
Component: core Version: 1.4.0
Severity: normal Keywords:
Cc: Blocked By:
Need User Feedback: Blocking:

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

Attachments

Change History

Changed 3 years ago by jan

  • status changed from new to closed
  • resolution set to fixed

thanks for this reports, a fix has been commited in [632]

Add/Change #234 (Case-sensitive problem with Content-Type)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.