Skip to content

[PR #7701/312f747d backport][3.9] Require full version and method regex matches#7703

Merged
Dreamsorcerer merged 1 commit into3.9from
patchback/backports/3.9/312f747de91f20fa33af03fd368f857fbd32f36a/pr-7701
Oct 15, 2023
Merged

[PR #7701/312f747d backport][3.9] Require full version and method regex matches#7703
Dreamsorcerer merged 1 commit into3.9from
patchback/backports/3.9/312f747de91f20fa33af03fd368f857fbd32f36a/pr-7701

Conversation

@patchback
Copy link
Copy Markdown
Contributor

@patchback patchback bot commented Oct 15, 2023

This is a backport of PR #7701 as merged into master (312f747).

What do these changes do?

These changes ensure that HTTP versions and methods fully match the regular expressions for those constructs. AIOHTTP currently only applies prefix-matching, which I assume was unintentional.

Are there changes in behavior for the user?

There should be no observable changes to the user, unless they use HTTP servers/clients that generate very malformed request lines. Such clients/servers are unlikely to exist because most other web servers reject these malformed messages.

Related issue number

Fixes #7700

## What do these changes do?

These changes ensure that HTTP versions and methods fully match the
regular expressions for those constructs. AIOHTTP currently only applies
prefix-matching, which I assume was unintentional.

## Are there changes in behavior for the user?

There should be no observable changes to the user, unless they use HTTP
servers/clients that generate very malformed request lines. Such
clients/servers are unlikely to exist because most other web servers
reject these malformed messages.

## Related issue number

Fixes #7700

(cherry picked from commit 312f747)
@codecov
Copy link
Copy Markdown

codecov bot commented Oct 15, 2023

Codecov Report

Merging #7703 (9c65fcf) into 3.9 (6791b9e) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##              3.9    #7703      +/-   ##
==========================================
+ Coverage   97.30%   97.32%   +0.01%     
==========================================
  Files         107      107              
  Lines       31857    31857              
  Branches     3719     3719              
==========================================
+ Hits        31000    31004       +4     
+ Misses        653      648       -5     
- Partials      204      205       +1     
Flag Coverage Δ
CI-GHA 97.23% <100.00%> (+0.01%) ⬆️
OS-Linux 96.91% <100.00%> (ø)
OS-Windows 94.42% <100.00%> (ø)
OS-macOS 96.58% <100.00%> (+0.01%) ⬆️
Py-3.10.11 94.33% <100.00%> (ø)
Py-3.10.13 96.74% <100.00%> (ø)
Py-3.11.5 96.43% <100.00%> (+<0.01%) ⬆️
Py-3.8.10 94.31% <100.00%> (ø)
Py-3.8.18 96.68% <100.00%> (ø)
Py-3.9.13 94.31% <100.00%> (ø)
Py-3.9.18 96.73% <100.00%> (+0.01%) ⬆️
Py-pypy7.3.11 96.19% <100.00%> (ø)
VM-macos 96.58% <100.00%> (+0.01%) ⬆️
VM-ubuntu 96.91% <100.00%> (ø)
VM-windows 94.42% <100.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
aiohttp/http_parser.py 98.16% <100.00%> (ø)
tests/test_http_parser.py 99.17% <100.00%> (ø)

... and 1 file with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@Dreamsorcerer Dreamsorcerer merged commit 6104dde into 3.9 Oct 15, 2023
@Dreamsorcerer Dreamsorcerer deleted the patchback/backports/3.9/312f747de91f20fa33af03fd368f857fbd32f36a/pr-7701 branch October 15, 2023 14:58
xiangxli pushed a commit to xiangxli/aiohttp that referenced this pull request Dec 4, 2023
…thod regex matches (aio-libs#7703)

**This is a backport of PR aio-libs#7701 as merged into master
(312f747).**

These changes ensure that HTTP versions and methods fully match the
regular expressions for those constructs. AIOHTTP currently only applies
prefix-matching, which I assume was unintentional.

There should be no observable changes to the user, unless they use HTTP
servers/clients that generate very malformed request lines. Such
clients/servers are unlikely to exist because most other web servers
reject these malformed messages.

Fixes aio-libs#7700

Co-authored-by: Ben Kallus <[email protected]>
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.

2 participants