From a93eca0b83e4d890c28d271eb3293f08666c613e Mon Sep 17 00:00:00 2001 From: "Thomas E. Dickey" Date: Thu, 7 Aug 1997 11:19:32 -0400 Subject: snapshot of project "lynx", label v2-7-1ac_0-46 --- WWW/Library/Implementation/HTTP.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'WWW/Library/Implementation/HTTP.c') diff --git a/WWW/Library/Implementation/HTTP.c b/WWW/Library/Implementation/HTTP.c index 980b8f6e..0bcc2c62 100644 --- a/WWW/Library/Implementation/HTTP.c +++ b/WWW/Library/Implementation/HTTP.c @@ -485,7 +485,23 @@ try_again: ** If we do have a cookie set, add it to the request buffer. - FM */ if (cookie != NULL) { + if (*cookie != '$') { + /* + ** It's a historical cookie, so signal to the + ** server that we support modern cookies. - FM + */ + StrAllocCat(command, "Cookie2: $Version=\"1\""); + StrAllocCat(command, crlf); + if (TRACE) + fprintf(stderr, + "HTTP: Sending Cookie2: $Version =\"1\"\n"); + } if (*cookie != '\0') { + /* + ** It's not a zero-length string, so add the header. + ** Note that any folding of long strings has been + ** done already in LYCookie.c. - FM + */ StrAllocCat(command, "Cookie: "); StrAllocCat(command, cookie); StrAllocCat(command, crlf); -- cgit 1.4.1-2-gfad0