Skip to content

Commit 437e7a0

Browse files
committed
Merge pull request #195 from wendal/patch-3
fix: change rindex to strrchr
2 parents d10db95 + fc118fa commit 437e7a0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libhttpd/api.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -916,7 +916,7 @@ httpdSendFile(httpd * server, request * r, const char *path)
916916
char *suffix;
917917
struct stat sbuf;
918918

919-
suffix = rindex(path, '.');
919+
suffix = strrchr(path, '.');
920920
if (suffix != NULL) {
921921
if (strcasecmp(suffix, ".gif") == 0)
922922
strcpy(r->response.contentType, "image/gif");

0 commit comments

Comments
 (0)