mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-17 14:46:13 +03:00
Make internal m_strcasestr default
This commit is contained in:
parent
a4c68c8638
commit
9d19e7b06b
@ -288,7 +288,7 @@ int init_response_body_html_parser(modsec_rec *msr) {
|
||||
}
|
||||
|
||||
if((msr->r->content_encoding == NULL)||(apr_strnatcasecmp(msr->r->content_encoding,"(null)")==0)){
|
||||
charset=ap_strcasestr(msr->r->content_type,"charset=");
|
||||
charset=m_strcasestr(msr->r->content_type,"charset=");
|
||||
if(charset == NULL){
|
||||
if (msr->txcfg->debuglog_level >= 4)
|
||||
msr_log(msr, 4, "init_response_body_html_parser: assuming ISO-8859-1.");
|
||||
@ -1014,7 +1014,7 @@ int inject_encrypted_response_body(modsec_rec *msr, int elts) {
|
||||
encoding = (const char *) htmlGetMetaEncoding(msr->crypto_html_tree);
|
||||
|
||||
if (ctype && encoding == NULL) {
|
||||
if (ctype && (p = ap_strcasestr(ctype, "charset=") , p != NULL)) {
|
||||
if (ctype && (p = m_strcasestr(ctype, "charset=") , p != NULL)) {
|
||||
p += 8 ;
|
||||
if (encoding = apr_pstrndup(msr->mp, p, strcspn(p, " ;") ), encoding) {
|
||||
xmlCharEncoding enc;
|
||||
|
@ -569,9 +569,8 @@ char *file_basename(apr_pool_t *mp, const char *filename) {
|
||||
|
||||
return d;
|
||||
}
|
||||
/*
|
||||
#if (defined(WIN32) || (HAVE_STRCASESTR == 0))
|
||||
char *strcasestr(const char *haystack, const char *needle) {
|
||||
|
||||
char *m_strcasestr(const char *haystack, const char *needle) {
|
||||
char aux, lower_aux;
|
||||
int length;
|
||||
|
||||
@ -588,8 +587,7 @@ char *strcasestr(const char *haystack, const char *needle) {
|
||||
}
|
||||
return ((char *)haystack);
|
||||
}
|
||||
#endif
|
||||
*/
|
||||
|
||||
#ifdef WIN32
|
||||
int inet_pton(int family, const char *src, void *dst) {
|
||||
struct addrinfo addr;
|
||||
|
@ -32,11 +32,8 @@
|
||||
#include <ws2tcpip.h>
|
||||
int DSOLOCAL inet_pton(int family, const char *src, void *dst);
|
||||
#endif
|
||||
/*
|
||||
#if (defined(WIN32) || (HAVE_STRCASESTR == 0))
|
||||
char DSOLOCAL *strcasestr(const char *haystack, const char *needle);
|
||||
#endif
|
||||
*/
|
||||
|
||||
char DSOLOCAL *m_strcasestr(const char *haystack, const char *needle);
|
||||
|
||||
int DSOLOCAL normalize_path_inplace(unsigned char *input, int len, int win, int *changed);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user