if (attr->num_values != 1 || attr->value_tag != IPP_TAG_KEYWORD ||
strcmp(attr->values[0].string.text, "none"))
- {
respond_unsupported(client, attr);
- }
else
fprintf(stderr, "%s %s compression=\"%s\"\n",
client->http.hostname,
IPP_TAG_ZERO)) != NULL)
{
if (attr->num_values != 1 || attr->value_tag != IPP_TAG_MIMETYPE)
- {
respond_unsupported(client, attr);
- }
else
{
format = attr->values[0].string.text;
if (!strcmp(format, "application/octet-stream") &&
(client->request->request.op.operation_id == IPP_PRINT_JOB ||
- client->request->request.op.operation_id != IPP_SEND_DOCUMENT))
+ client->request->request.op.operation_id == IPP_SEND_DOCUMENT))
{
/*
* Auto-type the file using the first 4 bytes of the file...
ippOpString(client->request->request.op.operation_id), format);
if (!attr)
- ippAddString(client->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
- "document-format", NULL, format);
+ attr = ippAddString(client->request, IPP_TAG_JOB, IPP_TAG_MIMETYPE,
+ "document-format", NULL, format);
else
{
_cupsStrFree(attr->values[0].string.text);
}
}
- if ((supported = ippFindAttribute(client->printer->attrs,
+ if (client->request->request.op.operation_id != IPP_CREATE_JOB &&
+ (supported = ippFindAttribute(client->printer->attrs,
"document-format-supported",
IPP_TAG_MIMETYPE)) != NULL)
{
if (!_cups_strcasecmp(format, supported->values[i].string.text))
break;
- if (i >= supported->num_values)
- {
+ if (i >= supported->num_values && attr)
respond_unsupported(client, attr);
- }
}
return (!client->response->attrs ||