Skip to content

Context parameters are all lowercase #660

@mredig

Description

@mredig

I have a url that has a case sensitive path parameter and is getting mangled when retrieving parameters.

...
routerGroup.get("/recorded/:file", use: recordedStream)
...


@Sendable
private func recordedStream(from request: Request, context: C) async throws -> some ResponseGenerator {
...
	let filename = try context.parameters.require("file", as: String.self) // caps mismatch
...

The value is always lowercased when retrieved this way, but should be able to contain all valid ASCII characters. I debugged it back to find context.parameters being generated by the trie, but I have not yet wrapped my head around the trie data structure and got lost in there.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions