You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But the following PATCH request raises an exception
Minitest::UnexpectedError: ActionController::BadRequest: Invalid request parameters: Rack::Multipart::EmptyContentError
But doesn't work from minitest: @headers="content-disposition: form-data; name=\"attachment[attachment]\"; filename=\"fixture_file.json\"\r\ncontent-type: text/plain\r\ncontent-length: 203\r\n">}
The only differences I can find were capitalized Content-* header names and presence of content-length in minitest request headers (content-length 203 corresponds to the real size of the file). Changing of text/plain to application/json or application/octet-stream had no effect.
Downgrading to rack 2.2.8 solves the issue.
Rails 7.1.2, minitest 5.20.0
The text was updated successfully, but these errors were encountered:
Where do the post and patch methods come from? They aren't in minitest or rack. Maybe in rack-test? Are you using an old version of rack-test (before rack-test 2.0.0)?
Can you post a minimal self contained example showing the problem?
POST requests work:
But the following PATCH request raises an exception
Minitest::UnexpectedError: ActionController::BadRequest: Invalid request parameters: Rack::Multipart::EmptyContentError
At the same time it works from browser:
@headers="Content-Disposition: form-data; name=\"attachment[attachment]\"; filename=\"fixture_file.json\"\r\nContent-Type: text/plain\r\n">}
But doesn't work from minitest:
@headers="content-disposition: form-data; name=\"attachment[attachment]\"; filename=\"fixture_file.json\"\r\ncontent-type: text/plain\r\ncontent-length: 203\r\n">}
The only differences I can find were capitalized Content-* header names and presence of content-length in minitest request headers (content-length 203 corresponds to the real size of the file). Changing of text/plain to application/json or application/octet-stream had no effect.
Downgrading to rack 2.2.8 solves the issue.
Rails 7.1.2, minitest 5.20.0
The text was updated successfully, but these errors were encountered: