]> git.ipfire.org Git - thirdparty/cups.git/blobdiff - cups/request.c
Merge changes from CUPS 1.5svn-r9491.
[thirdparty/cups.git] / cups / request.c
index df2c0137cfe2f9a15438cd6a94915c6a53b8d053..31b316cb3d64c2290cc2404000efb10ecca87305 100644 (file)
@@ -638,10 +638,23 @@ cupsSendRequest(http_t     *http, /* I - Connection to server or @code CUPS_HTTP
     */
 
     httpClearFields(http);
-    httpSetLength(http, length);
+    httpSetExpect(http, expect);
     httpSetField(http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
+    httpSetLength(http, length);
+
+#ifdef HAVE_GSSAPI
+    if (http->authstring && !strncmp(http->authstring, "Negotiate", 9))
+    {
+     /*
+      * Do not use cached Kerberos credentials since they will look like a
+      * "replay" attack...
+      */
+
+      cupsDoAuthentication(http, "POST", resource);
+    }
+    else
+#endif /* HAVE_GSSAPI */
     httpSetField(http, HTTP_FIELD_AUTHORIZATION, http->authstring);
-    httpSetExpect(http, expect);
 
     DEBUG_printf(("2cupsSendRequest: authstring=\"%s\"", http->authstring));