Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

`Content-Type` Header Processing

Offen
#175 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
55/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Ruhig
Tech-Stack
javascript
Bereich
api, backend

Rechercherichtung

Verfolge die Request-Handler für /create, die update-y-Endpunkte und /query, und untersuche anschließend, wie Content-Type und Request-Bodies geparst werden. Überprüfe das Verhalten mit Requests, bei denen der Header fehlt, die nicht unterstützte JSON-Typen verwenden oder leere bzw. ungültige Bodies enthalten; als erledigt gilt die Aufgabe, wenn jeder ungültige Fall 400 mit einer hilfreichen Meldung zurückgibt und gültige JSON-Requests weiterhin erfolgreich sind, ohne leere Objekte zu erstellen.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

bug

The bug is that RERUM will create an empty object in the following scenario.

image

Note: If you do not omit the 'Content-Type' header from this request, RERUM correctly responds with a 400 and a good message.

When a request to /create (and likely others) happens and the request does not contain "Content-Type: application/json" but the body is a valid string or empty, RERUM processes the request and creates an empty object in the database. It responds 201 with that empty object as JSON in the body, and client applications receive the 201 with the empty object.

When a request to /create, any of the update-y endpoints, or /query comes in, it MUST contain the 'Content-Type' header, the value for the header has to a supported JSON type (application/json), the body MUST NOT be empty and MUST contain valid JSON with at least on key:value pair.

If any of these conditions are not met, RERUM should respond 400 - Bad Request with as detailed of a message as is useful.

Vorherrschende Sprache
JavaScript
Sterne
3
Forks
6
Ø Merge
4 T. 9 Std.
Gemergte PRs (30 T.)
5

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus CenterForDigitalHumanities/rerum_server_nodejs

Alle Issues in CenterForDigitalHumanities/rerum_server_nodejs

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.