Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default User-Agent header contains invalid characters #371

Open
IntoDEV opened this issue Dec 9, 2024 · 0 comments
Open

Default User-Agent header contains invalid characters #371

IntoDEV opened this issue Dec 9, 2024 · 0 comments

Comments

@IntoDEV
Copy link

IntoDEV commented Dec 9, 2024

The default User-Agent header value that is being added automatically to all requests (if not set manually) is invalid

\Amp\Http\Client\HttpClientBuilder::__construct
$this->defaultUserAgentInterceptor = new SetRequestHeaderIfUnset('user-agent', 'amphp/http-client @ v5.x');

as per rfc7230 section 3.2.6 the symbol @ is reserved
(put wrong rfc before)

while it's fine on most systems, if a server receiving requests is processing this header according to the rfc rules it starts giving errors

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant