summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthias Clasen <matthiasc@src.gnome.org>2006-10-03 18:19:15 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2006-10-03 18:19:15 +0000
commit7e480bb4b8d0004cc23a9d3e28deb3297a37c1cf (patch)
tree657c26412d3f58208bac6e50dd3d59071e653ee0 /modules
parent2878ecf6f7cc2b066d0bdfae7093d9428f4ddaae (diff)
downloadgtk+-7e480bb4b8d0004cc23a9d3e28deb3297a37c1cf.tar.gz
Complete the fix for bug 357280
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/cups/gtkcupsutils.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/modules/printbackends/cups/gtkcupsutils.c b/modules/printbackends/cups/gtkcupsutils.c
index d2c5462554..a19639783d 100644
--- a/modules/printbackends/cups/gtkcupsutils.c
+++ b/modules/printbackends/cups/gtkcupsutils.c
@@ -30,6 +30,10 @@
#include <stdlib.h>
#include <time.h>
+#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
+
typedef void (*GtkCupsRequestStateFunc) (GtkCupsRequest *request);
static void _connect (GtkCupsRequest *request);
@@ -534,7 +538,9 @@ _post_send (GtkCupsRequest *request)
httpClearFields(request->http);
httpSetField(request->http, HTTP_FIELD_CONTENT_LENGTH, length);
httpSetField(request->http, HTTP_FIELD_CONTENT_TYPE, "application/ipp");
+#ifdef HAVE_HTTP_AUTHSTRING
httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
+#endif
if (httpPost(request->http, request->resource))
{
@@ -821,7 +827,9 @@ _get_send (GtkCupsRequest *request)
}
httpClearFields(request->http);
+#ifdef HAVE_HTTP_AUTHSTRING
httpSetField(request->http, HTTP_FIELD_AUTHORIZATION, request->http->authstring);
+#endif
if (httpGet(request->http, request->resource))
{