mirror of
https://github.com/mirror/wget.git
synced 2025-03-25 01:00:13 +08:00
Fix misuse of strncasecmp
* src/http.c (set_content_type): Use c_strcasecmp instead of strncasecmp See issue bug #51576
This commit is contained in:
parent
f42229b1fd
commit
5fb6b6bd68
@ -2552,14 +2552,14 @@ set_content_type (int *dt, const char *type)
|
||||
of the multitude of broken CGI's that "forget" to generate the
|
||||
content-type. */
|
||||
if (!type ||
|
||||
0 == strncasecmp (type, TEXTHTML_S, strlen (TEXTHTML_S)) ||
|
||||
0 == strncasecmp (type, TEXTXHTML_S, strlen (TEXTXHTML_S)))
|
||||
0 == c_strcasecmp (type, TEXTHTML_S) ||
|
||||
0 == c_strcasecmp (type, TEXTXHTML_S))
|
||||
*dt |= TEXTHTML;
|
||||
else
|
||||
*dt &= ~TEXTHTML;
|
||||
|
||||
if (type &&
|
||||
0 == strncasecmp (type, TEXTCSS_S, strlen (TEXTCSS_S)))
|
||||
0 == c_strcasecmp (type, TEXTCSS_S))
|
||||
*dt |= TEXTCSS;
|
||||
else
|
||||
*dt &= ~TEXTCSS;
|
||||
|
Loading…
Reference in New Issue
Block a user