Closed michaelrsweet closed 1 month ago
[master d91acd442] Revert Host: header change (Issue #967)
[2.4.x 41b0b7891] Revert Host: header change (Issue #967)
Hi @michaelrsweet,
It will cause regression when printing over ipp-usb.
In sane-airscan+ipp-usb exactly the same problem exists, but I solve it a bit different way: when somebody connects to the ipp-usb, using the loopback IP address (127.0.0.1 or ::1) but Host != "loopback", ipp-usb issues HTTP 302 redirect to the localhost with the same port, and sane-airscan follows these redirects.
If CUPS could follow HTTP redirects, at least from localhost to localhost, It will solve the problem...
@alexpevzner IPP doesn't allow HTTP redirects because (per the HTTP standards) redirects with non-idempotent requests (POST/PUT/etc) are undefined.
WRT IPP-USB printers, we should be able to update the DNS-SD resolver to use "localhost" when the hostname resolves to 127.0.0.1 or ::1. Tracking that with issue #970...
Issue #185 introduced a change to map any HTTP request targeting the loopback interface to "localhost" in order to work around an Avahi bug. Unfortunately, this breaks access to network services that require a FQDN that just happen to resolve to 127.0.0.1 or ::1 (in addition to other addresses/network interfaces).
We need to revert that change.