mirror of
https://github.com/curl/curl.git
synced 2026-08-25 12:03:39 +03:00
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)
This commit is contained in:
parent
8f52b731f4
commit
01387f42c5
5 changed files with 31 additions and 28 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue