You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 10, 2026. It is now read-only.
ipp backend does not set compression for Send-Document operation #4181
Whenever the ipp backend uses "Create-Job" instead of "Print-Job", the parameter "compression" leads to printing problems (because the remote side does not decompress the data). The backend does not set the operation attribute "compression" for "Send-Document" operation.
Please check the attached patch and correct it, if necessary.
If the printer does not support HTTP/1.1 (which IPP requires), copy stdin
@@ -1284,7 +1316,7 @@
while (!job_canceled && validate_job)
{
request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2],
Activity
michaelrsweet commentedon Sep 15, 2012
CUPS.org User: mike
Fixed in Subversion repository.
michaelrsweet commentedon Sep 15, 2012
"cups-1.5.4-ipp-comp.patch":
--- backend/ipp.c.orig 2012-09-07 07:40:49.000000000 +0200
+++ backend/ipp.c 2012-09-07 11:34:59.000000000 +0200
@@ -99,6 +99,7 @@
/* Password tries /
static const char * const pattrs[] = / Printer attributes we want */
{
"compression-supported",
"copies-supported",
"cups-version",
"document-format-supported",
@@ -229,6 +230,7 @@
int job_id; /* job-id value /
ipp_attribute_t *job_sheets; / job-media-sheets-completed /
ipp_attribute_t *job_state; / job-state */
ipp_attribute_t compression_sup; / compression-supported /
ipp_attribute_t *copies_sup; / copies-supported /
ipp_attribute_t *cups_version; / cups-version /
ipp_attribute_t *format_sup; / document-format-supported /
@@ -245,7 +247,8 @@
copies_remaining; / Number of copies remaining /
const char *content_type, / CONTENT_TYPE environment variable /
*final_content_type, / FINAL_CONTENT_TYPE environment var */
int fd; /* File descriptor /
off_t bytes = 0; / Bytes copied /
char buffer[16384]; / Copy buffer */
@@ -794,6 +797,7 @@
*/
compression_sup = NULL;
copies_sup = NULL;
cups_version = NULL;
format_sup = NULL;
@@ -986,6 +990,16 @@
Check for supported attributes...
*/
if ((compression_sup = ippFindAttribute(supported, "compression-supported",
{
fprintf(stderr, "DEBUG: [%d] = "%s"\n", i,
}
if ((copies_sup = ippFindAttribute(supported, "copies-supported",
IPP_TAG_RANGE)) != NULL)
{
@@ -1202,8 +1216,26 @@
}
}
fprintf(stderr, "DEBUG: final_content_type="%s", document_format="%s", compression="%s"\n",
/*
@@ -1284,7 +1316,7 @@
while (!job_canceled && validate_job)
{
request = new_request(IPP_VALIDATE_JOB, version, uri, argv[2],
@@ -1357,7 +1389,7 @@
request = new_request((num_files > 1 || create_job) ? IPP_CREATE_JOB :
IPP_PRINT_JOB,
version, uri, argv[2], monitor.job_name, num_options,
/*
@@ -1568,6 +1600,10 @@
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, document_format);
if (compression_format)
fprintf(stderr, "DEBUG: Sending file %d using chunking...\n", i + 1);
http_status = cupsSendRequest(http, request, resource, 0);
if (http_status == HTTP_CONTINUE && request->state == IPP_DATA)
michaelrsweet commentedon Sep 15, 2012
"str4181.patch":
Index: backend/ipp.c
--- backend/ipp.c (revision 10596)
+++ backend/ipp.c (working copy)
@@ -1578,6 +1578,10 @@
ippAddString(request, IPP_TAG_OPERATION, IPP_TAG_MIMETYPE,
"document-format", NULL, document_format);
fprintf(stderr, "DEBUG: Sending file %d using chunking...\n", i + 1);http_status = cupsSendRequest(http, request, resource, 0);
if (http_status == HTTP_CONTINUE && request->state == IPP_DATA)