]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Send cookies in requests.
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Oct 2005 18:09:12 +0000 (18:09 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 28 Oct 2005 18:09:12 +0000 (18:09 +0000)
cups/http.c:
    - http_send(): Send Cookie header if the cookie string is
      set.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@4814 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http.c

index 9b6397cbef4a2eb320dce266ad4f2fb82fe43671..59d9a35f01216d7a286fd5f3e3cc8252e3917c2c 100644 (file)
@@ -1874,6 +1874,13 @@ http_send(http_t       *http,    /* I - HTTP data */
       }
     }
 
+  if (http->cookie)
+    if (httpPrintf(http, "Cookie: $Version=0; %s\r\n", http->cookie) < 1)
+    {
+      http->status = HTTP_ERROR;
+      return (-1);
+    }
+
   if (httpPrintf(http, "\r\n") < 1)
   {
     http->status = HTTP_ERROR;