Questions tagged [rfc3986]

A RFC entitled "Uniform Resource Identifier (URI): Generic Syntax"

See for more details on RFC

RFC 3986 was released in January 2005.

It supersedes RFC 2732, RFC 2396 and RFC 1808.

Note however the current URL Standard at https://url.spec.whatwg.org/ has among its goals:

Align RFC 3986 and RFC 3987 with contemporary implementations and obsolete them in the process. (E.g., spaces, other "illegal" code points, query encoding, equality, canonicalization, are all concepts not entirely shared, or defined.)

Resources:

55 questions
4912
votes
31 answers

What is the difference between a URI, a URL, and a URN?

What is the difference between a URL, a URI, and a URN?
Sean McMains
  • 57,907
  • 13
  • 47
  • 54
628
votes
13 answers

Which characters make a URL invalid?

Which characters make a URL invalid? Are these valid URLs? example.com/file[/].html http://example.com/file[/].html
good
  • 6,311
  • 3
  • 16
  • 5
57
votes
1 answer

Is a URL with // in the path-section valid?

I have a question regarding URLs: I've read the RFC 3986 and still have a question about one URL: If a URI contains an authority component, then the path component must either be empty or begin with a slash ("/") character. If a URI does not…
Christian Kuetbach
  • 15,850
  • 5
  • 43
  • 79
44
votes
5 answers

'+' (plus sign) not encoded with RestTemplate using String url, but interpreted as ' ' (space)

We are moving from Java 8 to Java 11, and thus, from Spring Boot 1.5.6 to 2.1.2. We noticed, that when using RestTemplate, the '+' sign is not encoded to '%2B' anymore (changes by SPR-14828). This would be okay, because RFC3986 doesn't list '+' as a…
Gregor Eesmaa
  • 1,206
  • 1
  • 14
  • 22
34
votes
6 answers

What is the semicolon reserved for in URLs?

The RFC 3986 URI: Generic Syntax specification lists a semicolon as a reserved (sub-delim) character: reserved = gen-delims / sub-delims gen-delims = ":" / "/" / "?" / "#" / "[" / "]" / "@" sub-delims = "!" / "$" / "&" / "'" / "(" / ")" …
Nicole
  • 32,841
  • 11
  • 75
  • 101
28
votes
2 answers

Official name for URL "scheme plus authority"

Assume an absolute http or https URL. I'm looking for an "official" or generally accepted name for the part of the URL that comes before the path. http://foo:bar@example.com:8042/over/there?name=ferret#nose \_____________________________/ …
Søren Løvborg
  • 8,354
  • 2
  • 47
  • 40
20
votes
6 answers

Can HTTP URIs have non-ASCII characters?

I tried to find this in the relevant RFC, IETF RFC 3986, but couldn't figure it. Do URIs for HTTP allow Unicode, or non-ASCII of any kind? Can you please cite the section and the RFC that supports your answer. NB: For those who might think this is…
Cheeso
  • 189,189
  • 101
  • 473
  • 713
17
votes
5 answers

Java and RFC 3986 URI encoding

is there a class to encode a generic String following the RFC 3986 specification? That is: "hello world" => "hello%20world" Not (RFC 1738): "hello+world" Thanks
Mark
  • 67,098
  • 47
  • 117
  • 162
15
votes
4 answers

Is Java's URI.resolve incompatible with RFC 3986 when the relative URI contains an empty path?

I believe the definition and implementation of Java's URI.resolve method is incompatible with RFC 3986 section 5.2.2. I understand that the Java API defines how that method works, and if it were changed now it would break existing apps, but my…
Martin Pain
  • 713
  • 4
  • 18
13
votes
1 answer

When, if ever, should characters like { and } (curly braces) be percent-encoded in URLs?

According to RFC 3986 the following characters are reserved and need to be percent-encoded in order to be used in a URI other than as their reserved uses: :/?#[]@!$&'()*+,;= Furthermore it specifies some characters that are specifically unreserved:…
jacobq
  • 11,209
  • 4
  • 40
  • 71
11
votes
2 answers

RFC3986 - which pchars need to be percent-encoded?

I need to generate a href to a URI. All easy with the exception when it comes to reserved characters which need percent-encoding, e.g. link to /some/path;element should appear as (I know that path;element represents a…
mindas
  • 26,463
  • 15
  • 97
  • 154
10
votes
3 answers

.Net Uri Encoding RFC 2396 vs RFC 3986

First, some quick background... As part of an integration with a third party vendor, I have a C# .Net web application that receives a URL with a bunch of information in the query string. That URL is signed with an MD5 hash and a shared secret key.…
Colin
  • 143
  • 2
  • 8
9
votes
1 answer

What kind of URL is not conforming to RFC 3986 but is conforming to RFC 1808, RFC 1738, and RFC 2732?

The doc of URLComponents.init(url:resolvingAgainstBaseURL:) says: Returns the initialized URL components object, or nil if the URL could not be parsed. Knowing that: Swift URL/NSURL is for URLs based on RFC 1808, RFC 1738, and RFC 2732:…
Cœur
  • 37,241
  • 25
  • 195
  • 267
9
votes
4 answers

Resolving relative URLs in JavaScript

I'm building a JS library which has a requirement of looking at form[action] and a[href] values and resolving them into absolute URLs. For example, I'm on http://a/b/c/d;p?q and encounter an href value of "../g" (assume there's no element). …
Jeremy Dunck
  • 5,724
  • 6
  • 25
  • 30
8
votes
1 answer

Why is http:///example.org (with triple slash) treated as a valid URL by Firefox and webkit?

When the URL http:///example.org is opened in Firefox or webkit-based browsers, it opens http://example.org. I wonder if this is a valid behavior, i.e. if the extra slash should be stripped and example.org treated as an authority component. I read…
peter
  • 480
  • 3
  • 7
1
2 3 4