attributes-natural-language "en-US" is rejected by PAPPL >= 1.4.12 printers (RFC 8011 requires lowercase)
Una pull request collegata è già stata integrata.
- #141 di @ChrisEdgington — integrata
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 84/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- go
- Ambito
- networking
Direzione di ricerca
La richiesta viene costruita in ippGetPrinterAttributes() in ipp.go, intorno alle righe 118-119, dove attributes-natural-language è impostato su "en-US". Leggi il requisito di minuscole della RFC 8011 citato nell'issue, poi verifica come le altre richieste IPP in quel file impostano i valori di lingua. È fatto quando l'attributo viene inviato in minuscolo e una stampante PAPPL 1.4.12 restituisce successful-ok, cosa che chi ha segnalato ha confermato con ipptool print-job.test.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
ippGetPrinterAttributes() in ipp.go sends attributes-natural-language = "en-US". RFC 8011 §5.1.9 requires lowercase natural-language values in IPP ("IPP requires all lowercase values in IPP attributes", example 'en-us'). Since PAPPL 1.4.12, PAPPL-based printers validate this and reject the request with client-error-bad-request. ipp-usb then treats the device as having no IPP service and fails init with "Device doesn't implement print or scan service". No bridge port is ever opened.
This affects every printer whose firmware is built on PAPPL ≥ 1.4.12. We hit it on a Rollo X1040 label printer after the printer updated its own firmware.
Code
msg.Operation.Add(goipp.MakeAttribute("attributes-natural-language",
goipp.TagLanguage, goipp.String("en-US")))
Printer side
PAPPL commit 77d77816 ("Update poll error handling for consistency") added request-level validation:
else if (language && !ippValidateAttribute(language))
papplClientRespondIPP(client, IPP_STATUS_ERROR_BAD_REQUEST,
"Bad \"attributes-natural-language\" value '%s'.", ...);
The check is in _papplClientProcessIPP(), so it applies to every operation. ippValidateAttribute() in CUPS 2.4.x validates naturalLanguage values against a lowercase-only pattern.
Observed
Printer: Rollo X1040 (USB 09c5:1040).
Host: Debian 13 (Trixie) arm64, ipp-usb 0.9.23-1+b4. Current master has the same code.
The printer updated its own firmware between these two sessions. Same printer, same host, same ipp-usb, same en-US request.
Firmware 1.6.40 / PAPPL 1.4.8 accepts it (/var/log/ipp-usb/09c5-1040-<serial>-Rollo-X1040-Label-Printer.log):
16-09-2026 10:15:52: > ATTR "attributes-natural-language" naturalLanguage: en-US
16-09-2026 10:15:52: < Server: Rollo_AirPrint/1.6.40 PAPPL/1.4.8 CUPS IPP/2.0
16-09-2026 10:15:52: < STATUS successful-ok
Firmware 1.6.66 / PAPPL 1.4.12 rejects it:
07-10-2026 13:02:49: > ATTR "attributes-natural-language" naturalLanguage: en-US
07-10-2026 13:02:50: < Server: Rollo_AirPrint/1.6.66 PAPPL/1.4.12 CUPS IPP/2.0
07-10-2026 13:02:50: < STATUS client-error-bad-request
07-10-2026 13:02:50: < ATTR "status-message" textWithoutLanguage: Bad "attributes-natural-language" value 'en-US'.
07-10-2026 13:02:50: ! IPP: IPP: client-error-bad-request
07-10-2026 13:02:50: ! ESCL: eSCL: HTTP status: 404 Not Found
07-10-2026 13:02:50: - Bus 001 Device 004: resetting X1040 Label Printer
and main.log:
07-10-2026 13:02:50: ! PNP Bus 001 Device 004: Device doesn't implement print or scan service
Tested fix
I built 0.9.23 with only "en-US" changed to "en-us" and ran it against the same printer on firmware 1.6.66:
09-10-2026 10:21:01: > ATTR "attributes-natural-language" naturalLanguage: en-us
09-10-2026 10:21:02: < Server: Rollo_AirPrint/1.6.66 PAPPL/1.4.12 CUPS IPP/2.0
09-10-2026 10:21:02: < STATUS successful-ok
Init completed, the device was published via DNS-SD, and a PDF sent with ipptool (print-job.test) through the bridge printed (job-state = completed, job-completed-successfully).
Proposed fix
Change "en-US" to "en-us" in ippGetPrinterAttributes. I'll open a PR with this change.
Assisted-by: Claude:claude-opus-5-5 Claude Code
- Lingua principale
- Go
- Stelle
- 211
- Fork
- 35
- Merge medio
- 5h 47m
- PR unite (30g)
- 1
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenPrinting/ipp-usb
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
OpenPrinting/ipp-usb#142 · 2 commenti ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
OpenPrinting/ipp-usb#136 ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
OpenPrinting/ipp-usb#124 · 5 commenti ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 32/100
OpenPrinting/ipp-usb#123 · 10 commenti ·
-
arm64 and arm v7 OCI buildsAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
OpenPrinting/ipp-usb#122 · 1 commento ·
Tutte le issue di OpenPrinting/ipp-usb
Issue simili
-
ux
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
evcc-io/evcc#35605 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug report
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
type:bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
nightgauge/nightgauge#2732 ·
I maintainer di solito rispondono entro 1 giorno
-
fix below CVEsApertabug
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 5 giorni
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100