Skip to content

Cloudflare is refusing legitimate API calls #687

@kint3x

Description

@kint3x

My application recently stopped working, and after investigating, it appears that Cloudflare is blocking requests originating from Kodi. The issue seems to be that Python’s urllib (used by Kodi) automatically capitalizes the first letter of each word in the headers trakt-api-version and trakt-api-key.

This was working previously, so it seems likely that something changed on your end. While the requests succeed when using HTTP/2 (e.g., via httpx), this is not a practical solution for embedded devices like smart TVs, where httpx is not available.

Additionally, this behavior violates the HTTP/1.1 specification:

RFC 2616 §4.2: “Header field names are case-insensitive.”

In other words, servers should accept headers regardless of capitalization, but in this case, requests fail if the header names are not lowercase exactly as written.

Could you please look into this and ensure that requests with standard-compliant header capitalization are accepted?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions