35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
--- gtk+2.0-2.10.13.orig/modules/printbackends/cups/gtkcupsutils.c
|
|
+++ gtk+2.0-2.10.13/modules/printbackends/cups/gtkcupsutils.c
|
|
@@ -33,6 +33,9 @@
|
|
#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 1) || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR == 1 && CUPS_VERSION_PATCH >= 20)
|
|
#define HAVE_HTTP_AUTHSTRING 1
|
|
#endif
|
|
+#if CUPS_VERSION_MAJOR > 1 || (CUPS_VERSION_MAJOR == 1 && CUPS_VERSION_MINOR > 2)
|
|
+#define HAVE_GET_HTTP_AUTHSTRING
|
|
+#endif
|
|
|
|
typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request);
|
|
|
|
@@ -627,7 +630,9 @@
|
|
httpClearFields(request->http);
|
|
httpSetField(request->http, HTTP_FIELD_CONTENT_LENGTH, length);
|
|
httpSetField(request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
|
|
-#ifdef HAVE_HTTP_AUTHSTRING
|
|
+#if defined (HAVE_GET_HTTP_AUTHSTRING)
|
|
+ httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
|
|
+#elif defined (HAVE_HTTP_AUTHSTRING)
|
|
httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
|
|
#endif
|
|
|
|
@@ -966,7 +971,9 @@
|
|
}
|
|
|
|
httpClearFields(request->http);
|
|
-#ifdef HAVE_HTTP_AUTHSTRING
|
|
+#if defined (HAVE_GET_HTTP_AUTHSTRING)
|
|
+ httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, httpGetAuthString (request->http));
|
|
+#elif defined (HAVE_HTTP_AUTHSTRING)
|
|
httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
|
|
#endif
|
|
|