not specified (Issue #1217)
- Added `print-as-raster` printer and job attributes for forcing rasterization
(Issue #1282)
+- Added a "--user-agent" option to the `ipptool` command.
- Updated documentation (Issue #984, Issue #1086, Issue #1182)
- Updated translations (Issue #1146, Issue #1161, Issue #1164)
- Updated the configure script to default to installing to /usr/local.
] [
<strong>--stop-after-include-error</strong>
] [
+<strong>--user-agent</strong>
+<em>USER-AGENT</em>
+] [
<strong>--version</strong>
] [
<strong>-4</strong>
to stop if an error occurs in an included file. Normally
<strong>ipptool</strong>
will continue with subsequent tests after the INCLUDE directive.
+</p>
+ <p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--user-agent </strong><em>USER-AGENT</em><br>
+Specifies the HTTP User-Agent string to use.
+The default is based on the
+<strong>UserAgentTokens</strong>
+value in the
+<a href="client.conf.html"><strong>client.conf</strong>(5)</a>
+
+file.
</p>
<p style="margin-left: 2.5em; text-indent: -2.5em;"><strong>--version</strong><br>
Shows the version of
ipp://localhost/printers/myprinter create-printer-subscription.test
</pre>
<h2 id="ipptool-1.see-also">See Also</h2>
-<a href="ipptoolfile.html"><p><strong>ipptoolfile</strong>(5),</a>
+<a href="client.conf.html"><p><strong>client.conf</strong>(5),</a>
+
+<a href="ipptoolfile.html"><strong>ipptoolfile</strong>(5),</a>
IANA IPP Registry (<a href="https://www.iana.org/assignments/ipp-registrations">https://www.iana.org/assignments/ipp-registrations</a>),
PWG Internet Printing Protocol Workgroup (<a href="https://www.pwg.org/ipp">https://www.pwg.org/ipp</a>),
RFC 8011 (<a href="https://datatracker.ietf.org/doc/html/rfc8011">https://datatracker.ietf.org/doc/html/rfc8011</a>)
</p>
<h2 id="ipptool-1.copyright">Copyright</h2>
-<p>Copyright © 2021-2024 by OpenPrinting.
+<p>Copyright © 2021-2025 by OpenPrinting.
</body>
</html>
.\" Licensed under Apache License v2.0. See the file "LICENSE" for more
.\" information.
.\"
-.TH ipptool 1 "CUPS" "2025-04-30" "OpenPrinting"
+.TH ipptool 1 "CUPS" "2025-09-18" "OpenPrinting"
.SH NAME
ipptool \- perform internet printing protocol requests
.SH SYNOPSIS
] [
.B \-\-stop\-after\-include\-error
] [
+.B \-\-user\-agent
+.I USER-AGENT
+] [
.B \-\-version
] [
.B \-4
.B ipptool
will continue with subsequent tests after the INCLUDE directive.
.TP 5
+\fB\-\-user\-agent \fIUSER-AGENT\fR
+Specifies the HTTP User-Agent string to use.
+The default is based on the
+.B UserAgentTokens
+value in the
+.BR client.conf (5)
+file.
+.TP 5
.B \-\-version
Shows the version of
.B ipptool
ipp://localhost/printers/myprinter create\-printer\-subscription.test
.fi
.SH SEE ALSO
+.BR client.conf (5),
.BR ipptoolfile (5),
IANA IPP Registry (https://www.iana.org/assignments/ipp\-registrations),
PWG Internet Printing Protocol Workgroup (https://www.pwg.org/ipp),
RFC 8011 (https://datatracker.ietf.org/doc/html/rfc8011)
.SH COPYRIGHT
-Copyright \[co] 2021-2024 by OpenPrinting.
+Copyright \[co] 2021-2025 by OpenPrinting.
int verbosity; // Show all attributes?
char *bearer_token, // HTTP Bearer token
- *client_name; // TLS client certificate name
+ *client_name, // TLS client certificate name
+ *user_agent; // HTTP User-Agent value, if any
// Test Defaults
bool def_ignore_errors; // Default IGNORE-ERRORS value
{
data->stop_after_include_error = 1;
}
+ else if (!strcmp(argv[i], "--user-agent"))
+ {
+ i ++;
+
+ if (i >= argc)
+ {
+ _cupsLangPrintf(stderr, _("%s: Missing user agent after '--user-agent'."), "ipptool");
+ free_data(data);
+ usage();
+ }
+
+ data->user_agent = argv[i];
+ }
else if (!strcmp(argv[i], "--version"))
{
puts(CUPS_SVERSION);
httpSetDefaultField(http, HTTP_FIELD_ACCEPT_ENCODING, "deflate, gzip, identity");
+ if (data->user_agent)
+ httpSetDefaultField(http, HTTP_FIELD_USER_AGENT, data->user_agent);
+
if (data->timeout > 0.0)
httpSetTimeout(http, data->timeout, timeout_cb, NULL);
_cupsLangPuts(stderr, _("--ippserver filename Produce ippserver attribute file"));
_cupsLangPuts(stderr, _("--stop-after-include-error\n"
" Stop tests after a failed INCLUDE"));
+ _cupsLangPuts(stderr, _("--user-agent USER-AGENT Set the HTTP User-Agent string"));
_cupsLangPuts(stderr, _("--version Show version"));
_cupsLangPuts(stderr, _("-4 Connect using IPv4"));
_cupsLangPuts(stderr, _("-6 Connect using IPv6"));