Skip to content

Commit cbb8832

Browse files
authored
Expect all URL escapes to use uppercase hex (#232)
* Expect all URL escapes to use uppercase hex
1 parent 7b383e6 commit cbb8832

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.7.1] - 2025-01-03
8+
### Changed
9+
- Expect all URL escapes to use uppercase hex [#232](https://github.com/ipfs/gateway-conformance/pull/232)
10+
711
## [0.7.0] - 2025-01-03
812
### Changed
913
- Update dependencies [#226](https://github.com/ipfs/gateway-conformance/pull/226) and [#227](https://github.com/ipfs/gateway-conformance/pull/227)

docs/test-dsl-syntax.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ for non-GO developers that want to read or contribute tests.
1010

1111
golang's default string formating package is similar to C. Format strings might look like `"this is a %s"` where `%s` is a verb that will be replaced at runtime.
1212

13-
These verbs collides with URL-escaping a lot, strings like `/ipfs/Qm.../%c4%85/%c4%99` might trigger weird errors. We implemented a minimal templating library that is used almost everywhere in the test.
13+
These verbs collides with URL-escaping a lot, strings like `/ipfs/Qm.../%C4%85/%C4%99` might trigger weird errors. We implemented a minimal templating library that is used almost everywhere in the test.
1414

1515
It uses `{{name}}` as a replacement for `%s`. Other verbs are not supported.
1616

@@ -28,7 +28,7 @@ Fmt(`Etag: W/"{{etag-value}}"`, "weak-key") // => "ETag: W/\"weak-key\""
2828
It is required to always provide a meaningful `{{name}}`:
2929

3030
```golang
31-
Fmt(`/ipfs/{{cid}}/%c4%85/%c4%99`, fixture.myCID) // => "/ipfs/Qm..../%c4%85/%c4%99"
31+
Fmt(`/ipfs/{{cid}}/%C4%85/%C4%99`, fixture.myCID) // => "/ipfs/Qm..../%C4%85/%C4%99"
3232
```
3333

3434
Values are replaced in the order they are defined, and you may reuse named values

tests/dnslink_gateway_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ func TestDNSLinkGatewayUnixFSDirectoryListing(t *testing.T) {
4242
Response: Expect().
4343
Status(301).
4444
Headers(
45-
Header("Location").Equals(`/%c4%85/%c4%99/`),
45+
Header("Location").Equals(`/%C4%85/%C4%99/`),
4646
),
4747
},
4848
{

0 commit comments

Comments
 (0)