Ticket #234 (closed defect: fixed)
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
Note: See
TracTickets for help on using
tickets.

