Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ Solverr follows its own [Semantic Versioning](https://semver.org/), starting at

## [Unreleased]

### Fixes

- **Form POST requests from Prowlarr work again, instead of failing with "Request parameter 'headers' must be a list".** 1.6.0 started checking the type of the deprecated `headers` field, which Solverr has never read and which clients send as an object; it is accepted in any shape again and still ignored.

## [1.6.0]

### Additions
Expand Down
6 changes: 6 additions & 0 deletions src/dtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ def __init__(self, _dict):
'maxTimeout': None,
# A fractional wait is meaningful and both engines sleep on it happily.
'waitInSeconds': (int, float),
# Deprecated in FlareSolverr v2 and never read by Solverr; upstream
# FlareSolverr only warns and ignores it. Legacy clients such as Prowlarr
# still send an object here (its HeadersPost), which the `list` annotation
# above would reject outright. Exempt it rather than break a client that
# isn't wrong.
'headers': None,
}

_TYPE_NAMES = {
Expand Down
4 changes: 4 additions & 0 deletions src/test_request_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ def test_a_boolean_is_not_accepted_as_a_number(self):
with self.assertRaises(Exception):
self.check(tabs_till_verify=True)

def test_the_deprecated_headers_object_is_accepted(self):
# Prowlarr's form POST sends this shape; the field is never read.
self.assertIsNone(self.check(headers={"contentType": "application/x-www-form-urlencoded"}))

def test_a_numeric_max_timeout_string_is_left_to_its_own_validator(self):
# Deliberately coerced rather than type-checked, for callers that work today.
self.assertIsNone(self.check(maxTimeout="90000"))
Expand Down