diff -up --recursive gtk+-2.10.6/modules/printbackends/cups/gtkcupsutils.c gtk+-2.10.6-shared/modules/printbackends/cups/gtkcupsutils.c
--- gtk+-2.10.6/modules/printbackends/cups/gtkcupsutils.c	2006-10-03 11:14:38.000000000 -0700
+++ gtk+-2.10.6-shared/modules/printbackends/cups/gtkcupsutils.c	2007-07-06 15:41:39.000000000 -0700
@@ -96,6 +96,7 @@ gtk_cups_request_new (http_t *connection
                       const char *server,
                       const char *resource)
 {
+  static gint id=1;
   GtkCupsRequest *request;
   cups_lang_t *language;
   
@@ -163,6 +164,8 @@ gtk_cups_request_new (http_t *connection
   
   cupsLangFree (language);
 
+  request->id = id++;
+
   return request;
 }
 
@@ -523,6 +526,12 @@ _post_send (GtkCupsRequest *request)
   GTK_NOTE (PRINTING,
             g_print ("CUPS Backend: %s\n", G_STRFUNC));
 
+  if (!request->own_http && request->http_id) {
+    if (*(request->http_id) && (*(request->http_id) != request->id))
+      return;
+    *(request->http_id) = request->id;
+  }
+
   request->poll_state = GTK_CUPS_HTTP_WRITE;
 
   if (request->data_io != NULL)
@@ -570,6 +579,12 @@ _post_write_request (GtkCupsRequest *req
   GTK_NOTE (PRINTING,
             g_print ("CUPS Backend: %s\n", G_STRFUNC));
 
+  if (!request->own_http && request->http_id) {
+    if (*(request->http_id) && (*(request->http_id) != request->id))
+      return;
+    *(request->http_id) = request->id;
+  }
+
   request->poll_state = GTK_CUPS_HTTP_WRITE;
   
   ipp_status = ippWrite(request->http, request->ipp_request);
@@ -717,10 +732,11 @@ _post_check (GtkCupsRequest *request)
           return;
         }
     }
-/* TODO: detect ssl in configure.ac */
-#if HAVE_SSL
   else if (http_status == HTTP_UPGRADE_REQUIRED)
     {
+      cupsSetEncryption (HTTP_ENCRYPT_REQUIRED);
+      request->state = GTK_CUPS_POST_CONNECT;
+      
       /* Flush any error message... */
       httpFlush (request->http);
 
@@ -733,13 +749,15 @@ _post_check (GtkCupsRequest *request)
       request->attempts++;
       goto again;
     }
-#endif 
   else if (http_status != HTTP_OK)
     {
       int http_errno;
 
       http_errno = httpError (request->http);
 
+      if (!request->own_http && request->http_id)
+	*(request->http_id) = 0;
+
       if (http_errno == EPIPE)
         request->state = GTK_CUPS_POST_CONNECT;
       else
@@ -806,6 +824,8 @@ _post_read_response (GtkCupsRequest *req
     {
       request->state = GTK_CUPS_POST_DONE;
       request->poll_state = GTK_CUPS_HTTP_IDLE;
+      if (!request->own_http && request->http_id)
+	*(request->http_id) = 0;
     }
 }
 
@@ -815,6 +835,13 @@ _get_send (GtkCupsRequest *request)
   GTK_NOTE (PRINTING,
             g_print ("CUPS Backend: %s\n", G_STRFUNC));
 
+  if (!request->own_http && request->http_id) {
+    if (*(request->http_id) && (*(request->http_id) != request->id)) {
+      return;
+    }
+    *(request->http_id) = request->id;
+  }
+
   request->poll_state = GTK_CUPS_HTTP_WRITE;
 
   if (request->data_io == NULL)
@@ -879,10 +906,10 @@ _get_check (GtkCupsRequest *request)
       gtk_cups_result_set_error (request->result, "Can't prompt for authorization");
       return;
     }
-/* TODO: detect ssl in configure.ac */
-#if HAVE_SSL
   else if (http_status == HTTP_UPGRADE_REQUIRED)
     {
+      cupsSetEncryption (HTTP_ENCRYPT_REQUIRED);
+      request->state = GTK_CUPS_GET_CONNECT;
       /* Flush any error message... */
       httpFlush (request->http);
 
@@ -895,13 +922,15 @@ _get_check (GtkCupsRequest *request)
       request->attempts++;
       goto again;
     }
-#endif 
   else if (http_status != HTTP_OK)
     {
       int http_errno;
 
       http_errno = httpError (request->http);
 
+      if (!request->own_http && request->http_id)
+	*(request->http_id) = 0;
+
       if (http_errno == EPIPE)
         request->state = GTK_CUPS_GET_CONNECT;
       else
@@ -980,6 +1009,9 @@ _get_read_data (GtkCupsRequest *request)
 
   if (io_status == G_IO_STATUS_ERROR)
     {
+      if (!request->own_http && request->http_id)
+	*(request->http_id) = 0;
+
       request->state = GTK_CUPS_POST_DONE;
       request->poll_state = GTK_CUPS_HTTP_IDLE;
     
diff -up --recursive gtk+-2.10.6/modules/printbackends/cups/gtkcupsutils.h gtk+-2.10.6-shared/modules/printbackends/cups/gtkcupsutils.h
--- gtk+-2.10.6/modules/printbackends/cups/gtkcupsutils.h	2006-06-21 11:16:57.000000000 -0700
+++ gtk+-2.10.6-shared/modules/printbackends/cups/gtkcupsutils.h	2007-07-06 15:35:06.000000000 -0700
@@ -70,6 +70,8 @@ struct _GtkCupsRequest 
   GtkCupsPollState poll_state;
 
   gint own_http : 1; 
+  gint *http_id;
+  gint id;
 };
 
 #define GTK_CUPS_REQUEST_START 0
diff -up --recursive gtk+-2.10.6/modules/printbackends/cups/gtkprintbackendcups.c gtk+-2.10.6-shared/modules/printbackends/cups/gtkprintbackendcups.c
--- gtk+-2.10.6/modules/printbackends/cups/gtkprintbackendcups.c	2006-10-03 07:48:54.000000000 -0700
+++ gtk+-2.10.6-shared/modules/printbackends/cups/gtkprintbackendcups.c	2007-07-06 15:34:21.000000000 -0700
@@ -103,6 +103,8 @@ struct _GtkPrintBackendCups
   guint list_printers_poll;
   guint list_printers_pending : 1;
   guint got_default_printer   : 1;
+  http_t *http;
+  gint http_id;
 };
 
 static GObjectClass *backend_parent_class;
@@ -157,6 +159,7 @@ static cairo_surface_t *    cups_printer
 								    gdouble                            width,
 								    gdouble                            height,
 								    GIOChannel                        *cache_io);
+static void cache_http (GtkPrintBackendCups *backend, GtkCupsRequest *request);
 
 
 static void
@@ -412,12 +415,13 @@ gtk_print_backend_cups_print_stream (Gtk
   cups_printer = GTK_PRINTER_CUPS (gtk_print_job_get_printer (job));
   settings = gtk_print_job_get_settings (job);
 
-  request = gtk_cups_request_new (NULL,
+  request = gtk_cups_request_new (GTK_PRINT_BACKEND_CUPS(print_backend)->http,
                                   GTK_CUPS_POST,
                                   IPP_PRINT_JOB,
 				  data_io,
 				  NULL,
 				  cups_printer->device_uri);
+  cache_http(GTK_PRINT_BACKEND_CUPS(print_backend),request);
 
   gtk_cups_request_ipp_add_string (request, IPP_TAG_OPERATION, IPP_TAG_URI, "printer-uri",
                                    NULL, cups_printer->printer_uri);
@@ -742,12 +746,13 @@ cups_request_printer_info (GtkPrintBacke
       "queued-job-count"
     };
 
-  request = gtk_cups_request_new (NULL,
+  request = gtk_cups_request_new (GTK_PRINT_BACKEND_CUPS(print_backend)->http,
                                   GTK_CUPS_POST,
                                   IPP_GET_PRINTER_ATTRIBUTES,
 				  NULL,
 				  NULL,
 				  NULL);
+  cache_http(print_backend,request);
 
   printer_uri = g_strdup_printf ("ipp://localhost/printers/%s",
                                   printer_name);
@@ -1161,12 +1166,13 @@ cups_request_printer_list (GtkPrintBacke
 
   cups_backend->list_printers_pending = TRUE;
 
-  request = gtk_cups_request_new (NULL,
+  request = gtk_cups_request_new (cups_backend->http,
                                   GTK_CUPS_POST,
                                   CUPS_GET_PRINTERS,
 				  NULL,
 				  NULL,
 				  NULL);
+  cache_http(cups_backend,request);
 
   gtk_cups_request_ipp_add_strings (request, IPP_TAG_OPERATION, IPP_TAG_KEYWORD,
 				    "requested-attributes", G_N_ELEMENTS (pattrs),
@@ -1369,13 +1375,14 @@ cups_request_default_printer (GtkPrintBa
       return;
     }
   
-  request = gtk_cups_request_new (NULL,
+  request = gtk_cups_request_new (GTK_PRINT_BACKEND_CUPS(print_backend)->http,
                                   GTK_CUPS_POST,
                                   CUPS_GET_DEFAULT,
 				  NULL,
 				  NULL,
 				  NULL);
-  
+  cache_http(print_backend,request);
+
   cups_request_execute (print_backend,
                         request,
                         (GtkPrintCupsResponseCallbackFunc) cups_request_default_printer_cb,
@@ -2784,3 +2791,9 @@ cups_printer_get_capabilities (GtkPrinte
     GTK_PRINT_CAPABILITY_COLLATE |
     GTK_PRINT_CAPABILITY_REVERSE;
 }
+
+static void cache_http (GtkPrintBackendCups *backend, GtkCupsRequest *request) {
+  backend->http = request->http;
+  request->own_http = FALSE;
+  request->http_id = &(backend->http_id);
+}
