Skip to content

Commit fc118fa

Browse files
committed
fix: change rindex to strrchr
ChangeLog show this: 2009-11-03 * Fix #625, does not display failure notice when quiet is set to true * Fix #587, change index and rindex to strchr and strrchr * Fix #548, trim leading spaces of the config file's options now, #587 fixed again.
1 parent d10db95 commit fc118fa

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)