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

everything: gzip-file-as-resource treats an HTTP error response as file content

Aperta Adatta ai principianti
#5,207 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
78/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
typescript
Ambito
api, backend

Direzione di ricerca

Leggi src/everything/tools/gzip-file-as-resource.ts, concentrandoti su fetchSafely e sulla gestione esistente degli errori di dimensione e di timeout. Verifica come il lavoro precedente in #4953 ha gestito la risposta, poi aggiungi il comportamento descritto qui per le risposte non 2xx: annullare il body e riportare l’URL e lo status. Il lavoro è completato quando le risposte di errore HTTP falliscono invece di essere compresse con gzip o registrate come contenuto di un file.

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

Descrizione

bug server-everything v2
Problem

fetchSafely in src/everything/tools/gzip-file-as-resource.ts checks that a response has a body but never checks its status. A URL that answers 404 or 500 is gzipped and returned, or registered as a resource, as though it were the requested file, with the error page as its content.

Expected

A non-2xx response cancels the body and fails the call with an error naming the URL and the status, as the tool already does for size and timeout failures.

Prior work
  • #4953 by @kabishou11

The PR(s) above targeted the pre-refactor code and are closed as part of the backlog triage in #4875; this issue is where the work continues, with the PR(s) as a prototype. Thank you to their authors.

Lingua principale
TypeScript
Stelle
91.4k
Fork
11.8k
Merge medio
6h 37m
PR unite (30g)
147

Preparare l'ambiente

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 modelcontextprotocol/servers

Tutte le issue di modelcontextprotocol/servers

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.