if(httpheader) {
/* This line was read off an HTTP-header */
- const char *namep;
- const char *valuep;
const char *ptr;
size_t linelength = strlen(lineptr);
if(nlen) {
bool done = FALSE;
bool sep = FALSE;
+ const char *namep = ptr;
+ const char *valuep;
- namep = ptr;
ptr += nlen;
/* trim trailing spaces and tabs after name */
if(replace_old) {
/* the domains were identical */
- if(clist->spath && co->spath) {
- if(strcasecompare(clist->spath, co->spath))
- replace_old = TRUE;
- else
- replace_old = FALSE;
- }
- else if(!clist->spath && !co->spath)
- replace_old = TRUE;
- else
+ if(clist->spath && co->spath &&
+ !strcasecompare(clist->spath, co->spath))
+ replace_old = FALSE;
+ else if(!clist->spath != !co->spath)
replace_old = FALSE;
-
}
if(replace_old && !co->livecookie && clist->livecookie) {
/* now check if the domain is correct */
if(!co->domain ||
(co->tailmatch && !is_ip &&
- tailmatch(co->domain, co->domain? strlen(co->domain):0, host)) ||
+ tailmatch(co->domain, strlen(co->domain), host)) ||
((!co->tailmatch || is_ip) && strcasecompare(host, co->domain)) ) {
/*
* the right part of the host matches the domain stuff in the