Skip to content

URL-interop and path parameters #24

@joakime

Description

@joakime

Here's a bit of trivial for you.

From https://tools.ietf.org/html/rfc3986#section-3.3

A path like /path;a=b/with;c=foo/path;d=parameters

Path parameters support has existed in the IETF specs like this ...

The most recent RFC3986 is at odds with RFC7230 when it comes to path normalization when path parameters are in the mix.
The two sides don't agree, and I bet the w3c whatwg specs are also either at odds with, or have punted on, this feature of URI paths.

See https://datatracker.ietf.org/doc/html/rfc3986#section-6

Since path parameters start with a ; and don't have to contain a = or a key or a value.
The following are all allowed.

/a/;/
/a/.;/
/a/..;/
/a/..;b/
/a/..;b=/
/a/..;b=c/

What are you supposed to do when you have to normalize these?

Some examples:

http://machine.com/path;a=foo/..;z=y/what;c=bar
http://machine.com/path/..;?a=b
http://machine.com/path;a=b/../path;a=z
http://machine.com/;?a=b
http://machine.com/a/b/..;/c;/d

Some servers will treat ; as a path parameter and strip it out (to hold separately) and then normalize the non-path parameter version.
Some servers will treat ; as just a character in a path, so that /a/..;b/c is actually a dir called a with a directory ..;b inside of it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions