summaryrefslogtreecommitdiff
path: root/cups/http.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-10-21 13:52:24 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2014-10-21 13:52:24 +0000
commit4978eed9c0d774fa49f6bacea21d48b378b3a793 (patch)
treeb2549b7417042f496114296de0502e4b381962f0 /cups/http.c
parentbf766888c7c5968be0e8ed6fc45bf4ecff30815e (diff)
downloadcups-4978eed9c0d774fa49f6bacea21d48b378b3a793.tar.gz
The IPP backend did not work with some configurations of Windows (STR #4503)
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@12229 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r--cups/http.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/cups/http.c b/cups/http.c
index dfcd759ac..493044fed 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -2702,6 +2702,19 @@ httpSetField(http_t *http, /* I - HTTP connection */
http->server = _cupsStrAlloc(value);
break;
+ case HTTP_FIELD_WWW_AUTHENTICATE :
+ /* CUPS STR #4503 - don't override WWW-Authenticate for unknown auth schemes */
+ if (http->fields[HTTP_FIELD_WWW_AUTHENTICATE][0] &&
+ _cups_strncasecmp(value, "Basic ", 6) &&
+ _cups_strncasecmp(value, "Digest ", 7) &&
+ _cups_strncasecmp(value, "Negotiate ", 10))
+ {
+ DEBUG_printf(("1httpSetField: Ignoring unknown auth scheme in \"%s\".", value));
+ return;
+ }
+
+ /* Fall through to copy */
+
default :
strlcpy(http->fields[field], value, HTTP_MAX_VALUE);
break;