Skip to content

Commit

Permalink
Fix tests and update CHANGELOG
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoPrevato committed Jan 15, 2025
1 parent 998dd16 commit acacf86
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [2.0.8] - 2025-01-??

- Fix type error in `blacksheep/server/compression.py` `is_handled_encoding`;
contributed by @bymoye and @ChenyangGao.
- Fix issue where the host is not the proxy address when there is a proxy by
@ChenyangGao.

## [2.0.7] - 2024-02-17 :tulip:

- Fixes bug [#38](https://github.com/Neoteroi/BlackSheep-Docs/issues/38),
Expand Down
37 changes: 32 additions & 5 deletions tests/test_requests.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,17 +305,32 @@ def test_request_pyi():
"scope,trailing_slash,expected_value",
[
[
{"scheme": "https", "path": "/", "server": ("www.neoteroi.dev", 443)},
{
"scheme": "https",
"path": "/",
"server": ("www.neoteroi.dev", 443),
"headers": [],
},
False,
"https://www.neoteroi.dev/",
],
[
{"scheme": "https", "path": "/admin", "server": ("www.neoteroi.dev", 443)},
{
"scheme": "https",
"path": "/admin",
"server": ("www.neoteroi.dev", 443),
"headers": [],
},
False,
"https://www.neoteroi.dev/admin",
],
[
{"scheme": "https", "path": "/admin", "server": ("www.neoteroi.dev", 443)},
{
"scheme": "https",
"path": "/admin",
"server": ("www.neoteroi.dev", 443),
"headers": [],
},
True,
"https://www.neoteroi.dev/admin/",
],
Expand All @@ -324,17 +339,28 @@ def test_request_pyi():
"scheme": "https",
"path": "/admin",
"server": ("www.neoteroi.dev", 44777),
"headers": [],
},
True,
"https://www.neoteroi.dev:44777/admin/",
],
[
{"scheme": "http", "path": "/admin", "server": ("www.neoteroi.dev", 44777)},
{
"scheme": "http",
"path": "/admin",
"server": ("www.neoteroi.dev", 44777),
"headers": [],
},
True,
"http://www.neoteroi.dev:44777/admin/",
],
[
{"scheme": "http", "path": "/admin", "server": ("www.neoteroi.dev", 80)},
{
"scheme": "http",
"path": "/admin",
"server": ("www.neoteroi.dev", 80),
"headers": [],
},
True,
"http://www.neoteroi.dev/admin/",
],
Expand All @@ -344,6 +370,7 @@ def test_request_pyi():
"path": "/admin",
"server": ("www.neoteroi.dev", 80),
"query_string": b"foo=Hello%20World%20%C3%B8",
"headers": [],
},
False,
"http://www.neoteroi.dev/admin?foo=Hello%20World%20%C3%B8",
Expand Down

0 comments on commit acacf86

Please sign in to comment.