summaryrefslogtreecommitdiff
path: root/cups/http.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-07-16 19:37:34 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-07-16 19:37:34 +0000
commit6c2b2b194479fd5ace2b48378c13e7421023ac6d (patch)
tree5aa576807e48df72d6b6cd8ee68c93fe3c13afbf /cups/http.c
parent9870d12b8ff8844b6e797444f544f28913f3f653 (diff)
downloadcups-6c2b2b194479fd5ace2b48378c13e7421023ac6d.tar.gz
Fix cookie handling for web interface.
Allow access to auth certificates in the state directory. Remove client connection from select when all data has been read from client. git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12034 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r--cups/http.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/cups/http.c b/cups/http.c
index 553981522..a9954ed44 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -3593,8 +3593,15 @@ httpWriteResponse(http_t *http, /* I - HTTP connection */
if (http->cookie)
{
- if (httpPrintf(http, "Set-Cookie: %s path=/ httponly%s\r\n",
- http->cookie, http->tls ? " secure" : "") < 1)
+ if (strchr(http->cookie, ';'))
+ {
+ if (httpPrintf(http, "Set-Cookie: %s\r\n", http->cookie) < 1)
+ {
+ http->status = HTTP_STATUS_ERROR;
+ return (-1);
+ }
+ }
+ else if (httpPrintf(http, "Set-Cookie: %s; path=/; httponly;%s\r\n", http->cookie, http->tls ? " secure;" : "") < 1)
{
http->status = HTTP_STATUS_ERROR;
return (-1);