aboutsummaryrefslogtreecommitdiff
path: root/lib/cookie.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2002-10-28 21:52:00 +0000
committerDaniel Stenberg <daniel@haxx.se>2002-10-28 21:52:00 +0000
commit01387f42c582fdbebc12cee39ed91346bd42ec04 (patch)
treee403f027a594ae9f07156214b16a866a1fbc737c /lib/cookie.c
parent8f52b731f45eabd5b036b146a27e93ec7fa9e807 (diff)
kromJx@crosswinds.net's fix that now uses checkprefix() instead of
strnequal() when the third argument was strlen(first argument) anyway. This makes it less prone to errors. (Slightly edited by me)
Diffstat (limited to 'lib/cookie.c')
-rw-r--r--lib/cookie.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/cookie.c b/lib/cookie.c
index 64d26509b..23222f2bc 100644
--- a/lib/cookie.c
+++ b/lib/cookie.c
@@ -519,7 +519,7 @@ struct CookieInfo *Curl_cookie_init(char *file,
char *lineptr;
bool headerline;
while(fgets(line, MAX_COOKIE_LINE, fp)) {
- if(strnequal("Set-Cookie:", line, 11)) {
+ if(checkprefix("Set-Cookie:", line)) {
/* This is a cookie line, get it! */
lineptr=&line[11];
headerline=TRUE;
@@ -587,8 +587,8 @@ struct Cookie *Curl_cookie_getlist(struct CookieInfo *c,
/* now check the left part of the path with the cookies path
requirement */
- if(!co->path ||
- strnequal(path, co->path, strlen(co->path))) {
+ if(!co->path ||
+ checkprefix(co->path, path) ) {
/* and now, we know this is a match and we should create an
entry for the return-linked-list */