Troubleshooting

HTTP Response Code 403 returned

The 403 response code is returned when a GET request includes a body or a content-length header.

This commonly occurs when a client employs a single cURL session for multiple requests, and a GET request follows a prior POST or PUT request. By default, cURL accumulates request headers and includes all headers from preceding requests. Consequently, a POST or PUT request appends the content-length header, and the subsequent GET request is transmitted with this unintended header.

To avoid this issue, use the --next option in subsequent requests (curl_reset in PHP). This ensures that the headers are appropriately managed, preventing the inadvertent inclusion of headers from previous requests.

Are HTTP header names lowercase or Pascal-Case?

According to HTTP/2 standard, all headers are lowercase.