mirror of
https://github.com/samba-team/samba.git
synced 2025-03-27 22:50:26 +03:00
Put strcasecmp/strncasecmp on the banned list (except for needed calls
in iconv.c and nsswitch/). Using them means you're not thinking about multibyte at all and I really want to discourage that. Jeremy. (This used to be commit d7e35dfb9283d560d0ed2ab231f36ed92767dace)
This commit is contained in:
parent
3531647574
commit
bb0598faf5
@ -86,7 +86,7 @@ static NTSTATUS check_name_to_ntstatus_security(const struct auth_context *auth_
|
||||
long error_num;
|
||||
fstrcpy(user, user_info->smb_name.str);
|
||||
|
||||
if (strncasecmp("NT_STATUS", user, strlen("NT_STATUS")) == 0) {
|
||||
if (strnequal("NT_STATUS", user, strlen("NT_STATUS"))) {
|
||||
strupper_m(user);
|
||||
return nt_status_string_to_code(user);
|
||||
}
|
||||
|
@ -47,6 +47,20 @@
|
||||
#endif /* sprintf */
|
||||
#define sprintf __ERROR__XX__NEVER_USE_SPRINTF__;
|
||||
|
||||
/*
|
||||
* strcasecmp/strncasecmp aren't an error, but it means you're not thinking about
|
||||
* multibyte. Don't use them. JRA.
|
||||
*/
|
||||
#ifdef strcasecmp
|
||||
#undef strcasecmp
|
||||
#endif
|
||||
#define strcasecmp __ERROR__XX__NEVER_USE_STRCASECMP__;
|
||||
|
||||
#ifdef strncasecmp
|
||||
#undef strncasecmp
|
||||
#endif
|
||||
#define strncasecmp __ERROR__XX__NEVER_USE_STRCASECMP__;
|
||||
|
||||
#endif /* !_SPLINT_ */
|
||||
|
||||
#ifdef DEVELOPER
|
||||
|
@ -71,7 +71,7 @@ static BOOL string_match(const char *tok,const char *s, char *invalid_char)
|
||||
|
||||
if (tok[0] == '.') { /* domain: match last fields */
|
||||
if ((str_len = strlen(s)) > (tok_len = strlen(tok))
|
||||
&& strcasecmp(tok, s + str_len - tok_len) == 0)
|
||||
&& strequal(tok, s + str_len - tok_len))
|
||||
return (True);
|
||||
} else if (tok[0] == '@') { /* netgroup: look it up */
|
||||
#ifdef HAVE_NETGROUP
|
||||
@ -107,14 +107,14 @@ static BOOL string_match(const char *tok,const char *s, char *invalid_char)
|
||||
DEBUG(0,("access: netgroup support is not configured\n"));
|
||||
return (False);
|
||||
#endif
|
||||
} else if (strcasecmp(tok, "ALL") == 0) { /* all: match any */
|
||||
} else if (strequal(tok, "ALL")) { /* all: match any */
|
||||
return (True);
|
||||
} else if (strcasecmp(tok, "FAIL") == 0) { /* fail: match any */
|
||||
} else if (strequal(tok, "FAIL")) { /* fail: match any */
|
||||
return (FAIL);
|
||||
} else if (strcasecmp(tok, "LOCAL") == 0) { /* local: no dots */
|
||||
if (strchr_m(s, '.') == 0 && strcasecmp(s, "unknown") != 0)
|
||||
} else if (strequal(tok, "LOCAL")) { /* local: no dots */
|
||||
if (strchr_m(s, '.') == 0 && !strequal(s, "unknown"))
|
||||
return (True);
|
||||
} else if (!strcasecmp(tok, s)) { /* match host name or address */
|
||||
} else if (!strequal(tok, s)) { /* match host name or address */
|
||||
return (True);
|
||||
} else if (tok[(tok_len = strlen(tok)) - 1] == '.') { /* network */
|
||||
if (strncmp(tok, s, tok_len) == 0)
|
||||
@ -175,7 +175,7 @@ static BOOL list_match(const char **list,const char *item,
|
||||
*/
|
||||
|
||||
for (; *list ; list++) {
|
||||
if (strcasecmp(*list, "EXCEPT") == 0) /* EXCEPT: give up */
|
||||
if (strequal(*list, "EXCEPT")) /* EXCEPT: give up */
|
||||
break;
|
||||
if ((match = (*match_fn) (*list, item))) /* True or FAIL */
|
||||
break;
|
||||
@ -183,7 +183,7 @@ static BOOL list_match(const char **list,const char *item,
|
||||
/* Process exceptions to True or FAIL matches. */
|
||||
|
||||
if (match != False) {
|
||||
while (*list && strcasecmp(*list, "EXCEPT"))
|
||||
while (*list && !strequal(*list, "EXCEPT"))
|
||||
list++;
|
||||
|
||||
for (; *list; list++) {
|
||||
@ -275,8 +275,8 @@ static BOOL only_ipaddrs_in_list(const char** list)
|
||||
|
||||
for (; *list ; list++) {
|
||||
/* factor out the special strings */
|
||||
if (!strcasecmp(*list, "ALL") || !strcasecmp(*list, "FAIL") ||
|
||||
!strcasecmp(*list, "EXCEPT")) {
|
||||
if (strequal(*list, "ALL") || strequal(*list, "FAIL") ||
|
||||
strequal(*list, "EXCEPT")) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -56,7 +56,7 @@ static const char *charset_name(charset_t ch)
|
||||
else if (ch == CH_UTF8) ret = "UTF8";
|
||||
|
||||
#if defined(HAVE_NL_LANGINFO) && defined(CODESET)
|
||||
if (ret && strcasecmp(ret, "LOCALE") == 0) {
|
||||
if (ret && !strcmp(ret, "LOCALE")) {
|
||||
const char *ln = NULL;
|
||||
|
||||
#ifdef HAVE_SETLOCALE
|
||||
|
@ -21,6 +21,12 @@
|
||||
|
||||
#include "includes.h"
|
||||
|
||||
/*
|
||||
* We have to use strcasecmp here as the character conversions
|
||||
* haven't been initialised yet. JRA.
|
||||
*/
|
||||
|
||||
#undef strcasecmp
|
||||
|
||||
/**
|
||||
* @file
|
||||
|
@ -350,7 +350,7 @@ BOOL fetch_ldap_pw(char **dn, char** pw)
|
||||
}
|
||||
|
||||
for (i = 0; mods[i] != NULL; ++i) {
|
||||
if (mods[i]->mod_op == modop && !strcasecmp(mods[i]->mod_type, attribute))
|
||||
if (mods[i]->mod_op == modop && strequal(mods[i]->mod_type, attribute))
|
||||
break;
|
||||
}
|
||||
|
||||
@ -542,7 +542,7 @@ static int smbldap_open_connection (struct smbldap_state *ldap_state)
|
||||
SMB_ASSERT(sizeof(protocol)>10 && sizeof(host)>254);
|
||||
|
||||
/* skip leading "URL:" (if any) */
|
||||
if ( strncasecmp( p, "URL:", 4 ) == 0 ) {
|
||||
if ( strnequal( p, "URL:", 4 ) ) {
|
||||
p += 4;
|
||||
}
|
||||
|
||||
|
@ -45,10 +45,10 @@ void set_local_machine_name(const char* local_name, BOOL perm)
|
||||
* arrggg!!!
|
||||
*/
|
||||
|
||||
if (strcasecmp(local_name, "*SMBSERVER")==0)
|
||||
if (strequal(local_name, "*SMBSERVER"))
|
||||
return;
|
||||
|
||||
if (strcasecmp(local_name, "*SMBSERV")==0)
|
||||
if (strequal(local_name, "*SMBSERV"))
|
||||
return;
|
||||
|
||||
if (already_perm)
|
||||
|
@ -837,8 +837,8 @@ static BOOL matchname(char *remotehost,struct in_addr addr)
|
||||
* DNS is perverted). We always check the address list, though.
|
||||
*/
|
||||
|
||||
if (strcasecmp(remotehost, hp->h_name)
|
||||
&& strcasecmp(remotehost, "localhost")) {
|
||||
if (!strequal(remotehost, hp->h_name)
|
||||
&& !strequal(remotehost, "localhost")) {
|
||||
DEBUG(0,("host name/name mismatch: %s != %s\n",
|
||||
remotehost, hp->h_name));
|
||||
return False;
|
||||
|
@ -95,10 +95,10 @@ ADS_STRUCT *ads_init(const char *realm,
|
||||
ads->server.ldap_server = ldap_server? strdup(ldap_server) : NULL;
|
||||
|
||||
/* we need to know if this is a foreign realm */
|
||||
if (realm && *realm && strcasecmp(lp_realm(), realm) != 0) {
|
||||
if (realm && *realm && !strequal(lp_realm(), realm)) {
|
||||
ads->server.foreign = 1;
|
||||
}
|
||||
if (workgroup && *workgroup && strcasecmp(lp_workgroup(), workgroup) != 0) {
|
||||
if (workgroup && *workgroup && !strequal(lp_workgroup(), workgroup)) {
|
||||
ads->server.foreign = 1;
|
||||
}
|
||||
|
||||
|
@ -972,7 +972,7 @@ ADS_STATUS ads_del_dn(ADS_STRUCT *ads, char *del_dn)
|
||||
**/
|
||||
char *ads_ou_string(const char *org_unit)
|
||||
{
|
||||
if (!org_unit || !*org_unit || strcasecmp(org_unit, "Computers") == 0) {
|
||||
if (!org_unit || !*org_unit || strequal(org_unit, "Computers")) {
|
||||
return strdup("cn=Computers");
|
||||
}
|
||||
|
||||
@ -1970,8 +1970,8 @@ ADS_STATUS ads_workgroup_name(ADS_STRUCT *ads, TALLOC_CTX *mem_ctx, char **workg
|
||||
prefix_length = strlen(prefix);
|
||||
|
||||
for (i=0;principles[i]; i++) {
|
||||
if (strncasecmp(principles[i], prefix, prefix_length) == 0 &&
|
||||
strcasecmp(ads->config.realm, principles[i]+prefix_length) != 0 &&
|
||||
if (strnequal(principles[i], prefix, prefix_length) &&
|
||||
!strequal(ads->config.realm, principles[i]+prefix_length) &&
|
||||
!strchr(principles[i]+prefix_length, '.')) {
|
||||
/* found an alternate (short) name for the domain. */
|
||||
DEBUG(3,("Found alternate name '%s' for realm '%s'\n",
|
||||
|
@ -34,7 +34,7 @@ static BOOL ads_dc_name(const char *domain, struct in_addr *dc_ip, fstring srv_n
|
||||
ADS_STRUCT *ads;
|
||||
const char *realm = domain;
|
||||
|
||||
if (strcasecmp(realm, lp_workgroup()) == 0)
|
||||
if (strequal(realm, lp_workgroup()))
|
||||
realm = lp_realm();
|
||||
|
||||
ads = ads_init(realm, domain, NULL);
|
||||
|
@ -314,7 +314,7 @@ BOOL dfs_redirect(char* pathname, connection_struct* conn,
|
||||
return False;
|
||||
}
|
||||
|
||||
if (strcasecmp(dp.servicename, lp_servicename(SNUM(conn)) ) != 0)
|
||||
if (!strequal(dp.servicename, lp_servicename(SNUM(conn)) ))
|
||||
return False;
|
||||
|
||||
if (resolve_dfs_path(pathname, &dp, conn, findfirst_flag,
|
||||
@ -362,7 +362,7 @@ BOOL get_referred_path(char *pathname, struct junction_map* jn,
|
||||
parse_dfs_path(pathname, &dp);
|
||||
|
||||
/* Verify hostname in path */
|
||||
if (local_machine && (strcasecmp(local_machine, dp.hostname) != 0)) {
|
||||
if (local_machine && (!strequal(local_machine, dp.hostname))) {
|
||||
|
||||
/* Hostname mismatch, check if one of our IP addresses */
|
||||
if (!ismyip(*interpret_addr2(dp.hostname))) {
|
||||
@ -711,7 +711,7 @@ BOOL create_junction(char* pathname, struct junction_map* jn)
|
||||
parse_dfs_path(pathname,&dp);
|
||||
|
||||
/* check if path is dfs : validate first token */
|
||||
if (local_machine && (strcasecmp(local_machine,dp.hostname)!=0)) {
|
||||
if (local_machine && (!strequal(local_machine,dp.hostname))) {
|
||||
|
||||
/* Hostname mismatch, check if one of our IP addresses */
|
||||
if (!ismyip(*interpret_addr2(dp.hostname))) {
|
||||
|
@ -247,7 +247,7 @@ static BOOL win_election(struct work_record *work, int version,
|
||||
if (timeup < mytimeup)
|
||||
return(True);
|
||||
|
||||
if (strcasecmp(global_myname(), server_name) > 0)
|
||||
if (StrCaseCmp(global_myname(), server_name) > 0)
|
||||
return(False);
|
||||
|
||||
return(True);
|
||||
|
@ -336,7 +336,7 @@ static NTSTATUS sid_to_name(struct winbindd_domain *domain,
|
||||
DEBUG(5,("Mapped sid to [%s]\\[%s]\n", domains[0], *name));
|
||||
|
||||
/* Paranoia */
|
||||
if (strcasecmp(domain->name, domains[0]) != 0) {
|
||||
if (!strequal(domain->name, domains[0])) {
|
||||
DEBUG(1, ("domain name from domain param and PDC lookup return differ! (%s vs %s)\n", domain->name, domains[0]));
|
||||
return NT_STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
|
@ -92,13 +92,13 @@ static struct winbindd_domain *add_trusted_domain(const char *domain_name, const
|
||||
/* We can't call domain_list() as this function is called from
|
||||
init_domain_list() and we'll get stuck in a loop. */
|
||||
for (domain = _domain_list; domain; domain = domain->next) {
|
||||
if (strcasecmp(domain_name, domain->name) == 0 ||
|
||||
strcasecmp(domain_name, domain->alt_name) == 0) {
|
||||
if (strequal(domain_name, domain->name) ||
|
||||
strequal(domain_name, domain->alt_name)) {
|
||||
return domain;
|
||||
}
|
||||
if (alternative_name && *alternative_name) {
|
||||
if (strcasecmp(alternative_name, domain->name) == 0 ||
|
||||
strcasecmp(alternative_name, domain->alt_name) == 0) {
|
||||
if (strequal(alternative_name, domain->name) ||
|
||||
strequal(alternative_name, domain->alt_name)) {
|
||||
return domain;
|
||||
}
|
||||
}
|
||||
|
@ -2025,7 +2025,7 @@ static int lp_enum(const char *s,const struct enum_list *_enum)
|
||||
}
|
||||
|
||||
for (i=0; _enum[i].name; i++) {
|
||||
if (strcasecmp(_enum[i].name,s)==0)
|
||||
if (strequal(_enum[i].name,s))
|
||||
return _enum[i].value;
|
||||
}
|
||||
|
||||
|
@ -356,7 +356,7 @@ static BOOL get_unix_attributes (struct ldapsam_privates *ldap_state,
|
||||
}
|
||||
|
||||
for (values=ldap_values;*values;values++) {
|
||||
if (strcasecmp(*values, LDAP_OBJ_POSIXACCOUNT ) == 0) {
|
||||
if (strequal(*values, LDAP_OBJ_POSIXACCOUNT )) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -431,7 +431,7 @@ static struct smb_passwd *getsmbfilepwent(struct smbpasswd_privates *smbpasswd_s
|
||||
continue;
|
||||
}
|
||||
|
||||
if (!strncasecmp((char *) p, "NO PASSWORD", 11)) {
|
||||
if (strnequal((char *) p, "NO PASSWORD", 11)) {
|
||||
pw_buf->smb_passwd = NULL;
|
||||
pw_buf->acct_ctrl |= ACB_PWNOTREQ;
|
||||
} else {
|
||||
|
@ -427,7 +427,7 @@ static BOOL is_reserved_name(const char *name)
|
||||
for (i=0; reserved_names[i]; i++) {
|
||||
int len = strlen(reserved_names[i]);
|
||||
/* note that we match on COM1 as well as COM1.foo */
|
||||
if (strncasecmp(name, reserved_names[i], len) == 0 &&
|
||||
if (strnequal(name, reserved_names[i], len) &&
|
||||
(name[len] == '.' || name[len] == 0)) {
|
||||
return True;
|
||||
}
|
||||
|
@ -186,7 +186,7 @@ static int reply_spnego_kerberos(connection_struct *conn,
|
||||
}
|
||||
|
||||
*p = 0;
|
||||
if (strcasecmp(p+1, lp_realm()) != 0) {
|
||||
if (!strequal(p+1, lp_realm())) {
|
||||
DEBUG(3,("Ticket for foreign realm %s@%s\n", client, p+1));
|
||||
if (!lp_allow_trusted_domains()) {
|
||||
data_blob_free(&ap_rep);
|
||||
|
@ -216,7 +216,7 @@ int smbw_dir_open(const char *fname)
|
||||
smbw_NetServerEnum(&srv->cli, srv->server_name, SV_TYPE_ALL,
|
||||
smbw_server_add, NULL);
|
||||
*p = '#';
|
||||
} else if ((strcmp(srv->cli.dev,"IPC") == 0) || (strcasecmp(share,"IPC$") == 0)) {
|
||||
} else if ((strcmp(srv->cli.dev,"IPC") == 0) || (strequal(share,"IPC$"))) {
|
||||
DEBUG(4,("doing NetShareEnum\n"));
|
||||
smbw_share_add(".",0,"", NULL);
|
||||
smbw_share_add("..",0,"", NULL);
|
||||
@ -413,7 +413,7 @@ int smbw_chdir(const char *name)
|
||||
}
|
||||
|
||||
if (strncmp(srv->cli.dev,"IPC",3) &&
|
||||
strcasecmp(share, "IPC$") &&
|
||||
!strequal(share, "IPC$") &&
|
||||
strncmp(srv->cli.dev,"LPT",3) &&
|
||||
!smbw_getatr(srv, path,
|
||||
&mode, NULL, NULL, NULL, NULL, NULL)) {
|
||||
|
@ -85,7 +85,7 @@ static BOOL test_one(struct cli_state *cli, const char *name)
|
||||
data = tdb_fetch_bystring(tdb, shortname);
|
||||
if (data.dptr) {
|
||||
/* maybe its a duplicate long name? */
|
||||
if (strcasecmp(name, data.dptr) != 0) {
|
||||
if (!strequal(name, data.dptr)) {
|
||||
/* we have a collision */
|
||||
collisions++;
|
||||
printf("Collision between %s and %s -> %s "
|
||||
|
@ -84,14 +84,14 @@ uint32 get_sec_channel_type(const char *param)
|
||||
if (!(param && *param)) {
|
||||
return get_default_sec_channel();
|
||||
} else {
|
||||
if (strcasecmp(param, "PDC")==0) {
|
||||
if (strequal(param, "PDC")) {
|
||||
return SEC_CHAN_BDC;
|
||||
} else if (strcasecmp(param, "BDC")==0) {
|
||||
} else if (strequal(param, "BDC")) {
|
||||
return SEC_CHAN_BDC;
|
||||
} else if (strcasecmp(param, "MEMBER")==0) {
|
||||
} else if (strequal(param, "MEMBER")) {
|
||||
return SEC_CHAN_WKSTA;
|
||||
#if 0
|
||||
} else if (strcasecmp(param, "DOMAIN")==0) {
|
||||
} else if (strequal(param, "DOMAIN")) {
|
||||
return SEC_CHAN_DOMAIN;
|
||||
#endif
|
||||
} else {
|
||||
|
@ -140,7 +140,7 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
|
||||
BOOL enable = False;
|
||||
BOOL deny = False;
|
||||
|
||||
if (strncasecmp(set_str,"UQLIM:",6)==0) {
|
||||
if (strnequal(set_str,"UQLIM:",6)) {
|
||||
p += 6;
|
||||
*qtype = SMB_USER_QUOTA_TYPE;
|
||||
*cmd = QUOTA_SETLIM;
|
||||
@ -154,12 +154,12 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
|
||||
|
||||
fstrcpy(username_str,p);
|
||||
p = p2;
|
||||
} else if (strncasecmp(set_str,"FSQLIM:",7)==0) {
|
||||
} else if (strnequal(set_str,"FSQLIM:",7)) {
|
||||
p +=7;
|
||||
*qtype = SMB_USER_FS_QUOTA_TYPE;
|
||||
*cmd = QUOTA_SETLIM;
|
||||
todo = PARSE_LIM;
|
||||
} else if (strncasecmp(set_str,"FSQFLAGS:",9)==0) {
|
||||
} else if (strnequal(set_str,"FSQFLAGS:",9)) {
|
||||
p +=9;
|
||||
todo = PARSE_FLAGS;
|
||||
*qtype = SMB_USER_FS_QUOTA_TYPE;
|
||||
@ -189,13 +189,13 @@ static int parse_quota_set(pstring set_str, pstring username_str, enum SMB_QUOTA
|
||||
p2++;
|
||||
}
|
||||
|
||||
if (strncasecmp(p,"QUOTA_ENABLED",13)==0) {
|
||||
if (strnequal(p,"QUOTA_ENABLED",13)) {
|
||||
enable = True;
|
||||
} else if (strncasecmp(p,"DENY_DISK",9)==0) {
|
||||
} else if (strnequal(p,"DENY_DISK",9)) {
|
||||
deny = True;
|
||||
} else if (strncasecmp(p,"LOG_SOFTLIMIT",13)==0) {
|
||||
} else if (strnequal(p,"LOG_SOFTLIMIT",13)) {
|
||||
pqt->qflags |= QUOTAS_LOG_THRESHOLD;
|
||||
} else if (strncasecmp(p,"LOG_HARDLIMIT",13)==0) {
|
||||
} else if (strnequal(p,"LOG_HARDLIMIT",13)) {
|
||||
pqt->qflags |= QUOTAS_LOG_LIMIT;
|
||||
} else {
|
||||
return -1;
|
||||
|
@ -114,7 +114,7 @@ void cgi_load_variables(void)
|
||||
if (len > 0 &&
|
||||
(request_post ||
|
||||
((s=getenv("REQUEST_METHOD")) &&
|
||||
strcasecmp(s,"POST")==0))) {
|
||||
strequal(s,"POST")))) {
|
||||
while (len && (line=grab_line(f, &len))) {
|
||||
p = strchr_m(line,'=');
|
||||
if (!p) continue;
|
||||
@ -224,9 +224,9 @@ static void cgi_setup_error(const char *err, const char *header, const char *inf
|
||||
/* damn browsers don't like getting cut off before they give a request */
|
||||
char line[1024];
|
||||
while (fgets(line, sizeof(line)-1, stdin)) {
|
||||
if (strncasecmp(line,"GET ", 4)==0 ||
|
||||
strncasecmp(line,"POST ", 5)==0 ||
|
||||
strncasecmp(line,"PUT ", 4)==0) {
|
||||
if (strnequal(line,"GET ", 4) ||
|
||||
strnequal(line,"POST ", 5) ||
|
||||
strnequal(line,"PUT ", 4)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -301,7 +301,7 @@ static BOOL cgi_handle_authorization(char *line)
|
||||
fstring user, user_pass;
|
||||
struct passwd *pass = NULL;
|
||||
|
||||
if (strncasecmp(line,"Basic ", 6)) {
|
||||
if (!strnequal(line,"Basic ", 6)) {
|
||||
goto err;
|
||||
}
|
||||
line += 6;
|
||||
@ -489,22 +489,22 @@ void cgi_setup(const char *rootdir, int auth_required)
|
||||
and handle authentication etc */
|
||||
while (fgets(line, sizeof(line)-1, stdin)) {
|
||||
if (line[0] == '\r' || line[0] == '\n') break;
|
||||
if (strncasecmp(line,"GET ", 4)==0) {
|
||||
if (strnequal(line,"GET ", 4)) {
|
||||
got_request = True;
|
||||
url = strdup(&line[4]);
|
||||
} else if (strncasecmp(line,"POST ", 5)==0) {
|
||||
} else if (strnequal(line,"POST ", 5)) {
|
||||
got_request = True;
|
||||
request_post = 1;
|
||||
url = strdup(&line[5]);
|
||||
} else if (strncasecmp(line,"PUT ", 4)==0) {
|
||||
} else if (strnequal(line,"PUT ", 4)) {
|
||||
got_request = True;
|
||||
cgi_setup_error("400 Bad Request", "",
|
||||
"This server does not accept PUT requests");
|
||||
} else if (strncasecmp(line,"Authorization: ", 15)==0) {
|
||||
} else if (strnequal(line,"Authorization: ", 15)) {
|
||||
authenticated = cgi_handle_authorization(&line[15]);
|
||||
} else if (strncasecmp(line,"Content-Length: ", 16)==0) {
|
||||
} else if (strnequal(line,"Content-Length: ", 16)) {
|
||||
content_length = atoi(&line[16]);
|
||||
} else if (strncasecmp(line,"Accept-Language: ", 17)==0) {
|
||||
} else if (strnequal(line,"Accept-Language: ", 17)) {
|
||||
web_set_lang(&line[17]);
|
||||
}
|
||||
/* ignore all other requests! */
|
||||
|
Loading…
x
Reference in New Issue
Block a user