Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Request Header with a "-" failing

Aperta
#49 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
docker, javascript

Direzione di ricerca

Reproduce the failure with the provided Docker command and config.json, then inspect how the plugin passes Lighthouse settings to Network.setExtraHTTPHeaders. Compare the hyphenated and non-hyphenated header cases; done means valid headers with hyphens are accepted or the limitation is clearly documented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

awaiting response

I am running the following command: docker run --shm-size=1g --rm -v "$(pwd)":/sitespeed.io sitespeedio/sitespeed.io:11.9.3-plus1 --config /sitespeed.io/config.json http://www.domain.com/ with the contents of config.json being:

{
  "lighthouse": {
      "settings": {
        "extra-headers": {"X-Bot-Allow":"123"},
        "extraHeaders": {"X-Bot-Allow":"123"}
      }
    }
}

I get the following error:

[2020-03-06 22:44:31] ERROR: Lighthouse could not test http://www.domain.com/ please create an upstream issue: https://github.com/GoogleChrome/lighthouse/issues/new?template=Bug_report.md Error: Protocol error (Network.setExtraHTTPHeaders): Invalid header value, string expected
    at Function.fromProtocolMessage (/lighthouse/node_modules/lighthouse/lighthouse-core/lib/lh-error.js:132:19)
    at /lighthouse/node_modules/lighthouse/lighthouse-core/gather/connections/connection.js:123:25
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
[2020-03-06 22:44:31] ERROR: TypeError: Cannot read property 'lhr' of undefined
    at Object.processMessage (/lighthouse/index.js:200:28)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)

If I strip the hyphens from X-Bot-Allow, it works, but I need the hyphens as we use this header to allow our sites to not block our sitespeedio tests. Any ideas?

Lingua principale
JavaScript
Stelle
31
Fork
21
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di sitespeedio/plugin-lighthouse

Tutte le issue di sitespeedio/plugin-lighthouse

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.