Skip to content

Validate HTTP request headers - #919

Open
GrahamCampbell wants to merge 1 commit into
twilio:mainfrom
GrahamCampbell:gc/validate-http-request-headers
Open

Validate HTTP request headers#919
GrahamCampbell wants to merge 1 commit into
twilio:mainfrom
GrahamCampbell:gc/validate-http-request-headers

Conversation

@GrahamCampbell

@GrahamCampbell GrahamCampbell commented May 24, 2026

Copy link
Copy Markdown

This is a defence in depth PR to make sure that the header names are non-empty-strings and values are strings. Guzzle's PSR-7 2.x library will start to get more fussy about this from 2.11.0 by triggering deprecation errors, and 3.0.0 will throw InvalidArgumentException. The best approach I think is that the Twilio code does its own validation. I audited the code paths, and all your code should already be passing valid headers.

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