Skip to content

NOISSUE Remove request body from GET requests#17

Merged
mglowala merged 1 commit into
masterfrom
NOISSUE-remove-body-from-get-mg
May 21, 2026
Merged

NOISSUE Remove request body from GET requests#17
mglowala merged 1 commit into
masterfrom
NOISSUE-remove-body-from-get-mg

Conversation

@mglowala

@mglowala mglowala commented May 20, 2026

Copy link
Copy Markdown
Member

Production issue

Daily pickup point import in tamago started failing today:

InPost backend (behind Cloudflare) now rejects GET /v1/points when the request carries a body:

  • with Content-Type: application/jsonHTTP 400 "Your client has issued a malformed or illegal request"
  • without Content-TypeHTTP 502 from Cloudflare

Reproduced from the cron pod by replaying the exact Guzzle request:

curl -X GET 'https://api-shipx-pl.easypack24.net/v1/points?type=parcel_locker_only&per_page=500&page=1&fields=...' \
  -H 'User-Agent: GuzzleHttp/7' -H 'Content-Type: application/json' \
  --data-raw '{"searchCriteria":{...}}'
→ 400 Bad Request

The same URL without body returns 200. Bisection confirmed body in GET is the sole trigger - all individual headers (UA, Content-Type, etc.) are fine on their own.

Fix

FindPoints::findPoints was serializing the whole FindPointsRequest into the body of a GET request, duplicating data already passed via query string. RFC 9110 says clients SHOULD NOT send a body in GET; InPost / Cloudflare just started enforcing it.

  • Drop the body and Content-Type header from the HttpRequest in FindPoints.
  • Remove Serializer from FindPoints::__construct (no longer needed).

Test

Added findPointsSendsGetRequestWithoutBody regression test asserting the outgoing request is GET, has empty body and no Content-Type header.

@mglowala mglowala force-pushed the NOISSUE-remove-body-from-get-mg branch from 61c5ecd to 273345f Compare May 20, 2026 19:47

@lukasz-falda lukasz-falda left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Prosiłbym jednak w opisie dwa/trzy zdania o tym co jest robione (po ludzku). Taki elaborat to sobie sam dopowiem jak review zrobię 😛

@mglowala mglowala merged commit feff3e4 into master May 21, 2026
3 checks passed
@mglowala mglowala deleted the NOISSUE-remove-body-from-get-mg branch May 21, 2026 08:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants