Skip to content

Ignore empty parameters in type_params - #352

Open
afurm wants to merge 1 commit into
ruby:masterfrom
afurm:fix-type-params-trailing-semicolon
Open

afurm wants to merge 1 commit into
ruby:masterfrom
afurm:fix-type-params-trailing-semicolon

Conversation

@afurm

@afurm afurm commented Oct 11, 2026

Copy link
Copy Markdown
Member

A Content-Type with a trailing semicolon, like text/html; charset=utf-8; , makes type_params raise NoMethodError (undefined method strip for nil), because the last split element is blank. With response_body_encoding = true this breaks reading the response body.

This skips blank parameters. I added tests for type_params and for the response_body_encoding path.

Note: #312 touches the same lines, so I am happy to rebase on top of it or close this if the fix gets folded in there.

A Content-Type with a trailing semicolon such as
"text/html; charset=utf-8; " made type_params raise NoMethodError,
which also broke reading the body with response_body_encoding = true.

This branch has not been deployed

No deployments
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.

1 participant