Daniel Stenberg
35558e6bd7
David Cohen pointed out that RFC2109 says clients should allow cookies to
...
contain least 4096 bytes while libcurl only allowed 2047. I raised the limit
to 4999 now and made the used buffer get malloc()ed instead of simply
allocated on stack as before.
2004-06-22 21:15:51 +00:00
Daniel Stenberg
755f98e768
While talking to host a.b.c, libcurl did wrongly not accept cookies that were
...
set to the domain .a.b.c (that is with a dot prefix). This is now fixed and
test case 171 verifies it.
2004-05-21 20:40:15 +00:00
Daniel Stenberg
34e8baab9a
general cleanup to bail out nice and clean when a memory function fails
...
to deliver
2004-05-12 12:04:38 +00:00
Daniel Stenberg
bbafb2eb27
curl_global_init_mem() allows the memory functions to be replaced.
...
memory.h is included everywhere for this.
2004-05-11 11:30:23 +00:00
Daniel Stenberg
5dcab07c54
if a malloc fails, clear up the memory and return failure
2004-05-10 14:04:06 +00:00
Daniel Stenberg
9948250723
strequal() returns int so we typecast the return to bool when we store the
...
result as bool
2004-03-10 09:41:37 +00:00
Daniel Stenberg
7d8cd5906c
use calloc instead of malloc and we won't have to memset() the struct
2004-02-26 14:52:16 +00:00
Daniel Stenberg
d571064b65
Clear up int/long/size_t/ssize_t usage a bit
2004-02-26 13:40:43 +00:00
Daniel Stenberg
4d17d6876e
Dan Fandrich's cleanup patch to make pedantic compiler options cause less
...
warnings. Minor edits by me.
2004-01-29 13:56:45 +00:00
Daniel Stenberg
053f6c85ef
updated year in the copyright string
2004-01-07 09:19:33 +00:00
Daniel Stenberg
168703b7bf
Added some infof() calls, that require the data pointer so now several
...
cookie functions need that.
I also fixed the cookie loader to properly load and deal with cookies without
contents (or rather with a blank content).
2003-08-11 09:55:11 +00:00
Daniel Stenberg
98ee12bc35
Jan Sundin reported a case where curl ignored a cookie that browsers don't,
...
which turned up to be due to the number of dots in the 'domain'. I've now
made curl follow the the original netscape cookie spec less strict on that
part.
2003-08-04 23:05:57 +00:00
Daniel Stenberg
2bd71d70ff
use CURLDEBUG instead of MALLOCDEBUG
2003-06-26 06:50:32 +00:00
Daniel Stenberg
465de793e8
Skip any preceeding dots from the domain name of cookies when we keep them
...
in memory, only add it when we save the cookie. This makes all tailmatching
and domain string matching internally a lot easier.
This was also the reason for a remaining bug I introduced in my overhaul.
2003-05-15 22:28:19 +00:00
Daniel Stenberg
efd836d971
Many cookie fixes:
...
o Save domains in jars like Mozilla does. It means all domains set in
Set-Cookie: headers are dot-prefixed.
o Save and use the 'tailmatch' field in the Mozilla/Netscape cookie jars (the
second column).
o Reject cookies using illegal domains in the Set-Cookie: line. Concerns
both domains with too few dots or domains that are outside the currently
operating server host's domain.
o Set the path part by default to the one used in the request, if none was
set in the Set-Cookie line.
2003-04-30 17:03:43 +00:00
Sterling Hughes
ad6fca28f9
testing, ignore this commit
2003-03-31 15:59:17 +00:00
Daniel Stenberg
a7c72b7abf
removed the local variables for emacs and vim, use the new sample.emacs
...
way for emacs, and vim users should provide a similar non-polluting style
2003-01-29 10:14:20 +00:00
Daniel Stenberg
f26a338a54
copyright year update in the source header
2003-01-16 21:08:12 +00:00
Daniel Stenberg
01387f42c5
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)
2002-10-28 21:52:00 +00:00
Daniel Stenberg
ba4e69bebc
updated source code boilerplate/header
2002-09-03 11:52:59 +00:00
Daniel Stenberg
d8b2c819e7
properly skip white spaces on Set-Cookie: header lines
2002-07-29 22:22:49 +00:00
Daniel Stenberg
08ef208fb7
added disable-[protocol] support, largely provided by Miklos Nemeth
2002-06-11 11:13:01 +00:00
Daniel Stenberg
980a47b42b
support for ingoring session cookies added
2002-05-07 09:58:13 +00:00
Daniel Stenberg
2361aabbef
Dirk Manske made libcurl strip off white spaces from the beginning of cookie
...
contents.
2002-04-14 18:21:17 +00:00
Daniel Stenberg
541e5a3b82
Jacky Lam cookie parser fix for domains with preceeding dot
2002-03-25 09:08:33 +00:00
Daniel Stenberg
974f314f57
copyright string (year) update
2002-03-19 07:54:55 +00:00
Daniel Stenberg
3612c3774e
made Max-Age work as defined in the RFC.
...
my brain damaged fix to not parse spaces as part of the value is now fixed
to instead strip off trailing spaces from values.
2002-02-27 07:38:04 +00:00
Daniel Stenberg
66b8f48a88
When saving a cookie jar, set field 1 (counted from 0) properly to TRUE if the
...
domain starts with a dot.
2002-02-26 13:18:08 +00:00
Daniel Stenberg
a23a897ad2
removed crash on weird input, this also better discards silly input
2002-02-26 13:07:53 +00:00
Daniel Stenberg
87037136ef
As identified in bug report #495290 , the last "name=value" pair in a
...
Set-Cookie: line was ignored if they didn't end with a trailing
semicolon. This is indeed wrong syntax, but there are high-profile web sites
out there sending cookies like that so we must make a best-effort to parse
them.
2002-01-07 23:05:36 +00:00
Daniel Stenberg
d9a7773011
added precautions to not go insane when two matching cookies end up in the
...
cookie list, even though they're not supposed to do that...
2002-01-07 14:56:15 +00:00
Daniel Stenberg
6d35984286
prevent strdup()ing NULL -- Paul Harrington's report
2001-10-30 12:08:17 +00:00
Daniel Stenberg
c6822f5a7f
T. Bharath found this memory leak. It occurs when we replace an internally
...
already existing cookie with a new one.
2001-10-24 11:36:55 +00:00
Sterling Hughes
8e91d5de8e
looks nicer and is better compatible with older vim versions
2001-10-11 09:32:19 +00:00
Daniel Stenberg
f2a25966cf
cookiejar now enables the cookie engine
2001-10-10 12:48:32 +00:00
Daniel Stenberg
e719f4169c
corrected cookie-jar comment
2001-10-08 06:43:22 +00:00
Daniel Stenberg
598e8dfbfb
Now we're setting a default domain for received cookies so that we can
...
properly match those cookies in subsequent requests
2001-09-26 07:08:29 +00:00
Daniel Stenberg
3f5227dfc7
Curl_cookie_output() must check that there's a cookie struct present before
...
trying to address it!
2001-09-10 07:43:08 +00:00
Sterling Hughes
6147879837
Added formatting sections for emacs and vim
2001-09-07 04:01:32 +00:00
Daniel Stenberg
a2b6ef3478
cookie jar adjustments
2001-08-29 09:32:18 +00:00
Daniel Stenberg
9e5dfc15ac
improved the test
2001-08-26 14:28:05 +00:00
Daniel Stenberg
c9c2115088
started working on a function for writing (all) cookies, made it possible
...
to read multiple cookie files, no longer writes to the URL string passed
to the _add() function. The new stuff is now conditionally compiled on the
COOKIE define. Changed the _init() proto.
2001-08-23 14:05:25 +00:00
Daniel Stenberg
c8926138d1
commented out empty else blocks to shut up pedantic compilers
2001-08-14 08:17:29 +00:00
Daniel Stenberg
870bacd689
include strtok.h to get the prototype
2001-05-30 11:06:56 +00:00
Daniel Stenberg
d567659bf4
strtok() replaced with strtok_r()
2001-05-29 19:17:39 +00:00
Daniel Stenberg
72dec6cfec
Added Andres' comments about field 2 in netscape cookie files
2001-05-23 13:04:19 +00:00
Daniel Stenberg
8dc9f4330c
Andrés García's netscape cookie file parser fix
2001-05-23 09:26:45 +00:00
Daniel Stenberg
4031104404
Internal symbols that aren't static are now prefixed with 'Curl_'
2001-01-05 10:11:41 +00:00
Daniel Stenberg
24dee483e9
dual-license fix
2001-01-03 09:29:33 +00:00
Daniel Stenberg
78423c5899
Venkataramana Mokkapati corrected a cookie parser bug
2000-11-10 08:10:04 +00:00