Skip to content

Allow HTTP/3 protocol versions - #230

Open
masakielastic wants to merge 1 commit into
laminas:3.9.xfrom
masakielastic:feature/http3-protocol-version
Open

Allow HTTP/3 protocol versions#230
masakielastic wants to merge 1 commit into
laminas:3.9.xfrom
masakielastic:feature/http3-protocol-version

Conversation

@masakielastic

Copy link
Copy Markdown

Description

Update protocol version validation to accept HTTP/3 protocol versions.

MessageTrait::validateProtocolVersion() currently accepts the following values:

  • 1.0
  • 1.1
  • 2
  • 2.0

However, passing 3 to withProtocolVersion() results in an InvalidArgumentException.

This change adds support for both 3 and 3.0, following the existing handling of HTTP/2.

@froschdesign

Copy link
Copy Markdown
Member

@weierophinney @Xerkus
Can you spot any problems?

Comment thread test/MessageTraitTest.php
'1.1' => ['1.1'],
'2' => ['2'],
'2.0' => ['2.0'],
'3.0' => ['3.0'],

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a test for "3" as well. But with that in place, I'm 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants