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:

46 questions
5
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,234
  • 5
  • 23
  • 29
5
votes
1 answer

Java URL Class getPath(), getQuery() and getFile() inconsistent with RFC3986 URI Syntax

I am writing a utility class that semi-wraps Java's URL class, and I have written a bunch of test cases to verify the methods I have wrapped with a customized implementation. I don't understand the output of some of Java's getters for certain URL…
Selena
  • 1,944
  • 5
  • 26
  • 43
4
votes
1 answer

Example of invalid URI as per RFC 3986

For my unit test I'd like to find an example of invalid URI that will fail to match UriComponentsBuilder#URI_PATTERN regex from Spring MVC 3.1.1: private static final String SCHEME_PATTERN = "([^:/?#]+):"; private static final String HTTP_PATTERN =…
parxier
  • 3,611
  • 5
  • 40
  • 54
4
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
  • 32,421
  • 21
  • 173
  • 232
4
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
  • 400
  • 2
  • 7
3
votes
1 answer

Why do URIs of specifications/vocabularies contain date information?

Most example namespace URIs seem to contain some combination of year/month/day in their path: rdf: http://www.w3.org/1999/02/22-rdf-syntax-ns# rdfs: http://www.w3.org/2000/01/rdf-schema#> It's not obvious (to me) why it makes sense to include part…
zwelz
  • 435
  • 3
  • 10
3
votes
0 answers

remove_dot_segments seems to turn relative paths into absolute paths

"5.2.4. Remove Dot Segments" of Std 66 explains how to convert a path with . and .. into one without. IIUC, the input foo/../bar is processed as follows. Per step 1, the (input buffer, output buffer) are initialized to ("foo/../bar", "") Step 2.E…
Mike Samuel
  • 109,453
  • 27
  • 204
  • 234
3
votes
1 answer

Where to find the http url scheme rfc

In the RFC3986, it exclude portions of RFC1738 that defined the specific syntax of individual URI schemes, and the document says the these portions will be updated as separate documents, But I can't find it. Any one can tell me where to find the…
Helloguy
  • 31
  • 1
2
votes
3 answers

Why isn't % (percent) considered a reserved character in RFC 3986 (URI Syntax)?

Clearly % needs to be encoded. The wikipedia article on the standard says: Because the percent ("%") character serves as the indicator for percent-encoded octets, it must be percent-encoded as "%25" for that octet to be used as data within a…
John Bachir
  • 21,401
  • 22
  • 137
  • 203
2
votes
2 answers

Properly parse field containing '+' char

I'm running into a strange situation which I reproduced in https://github.com/lgueye/uri-parameters-behavior Since we migrated to spring-boot 2 (spring framework 5) when requesting one of our backends in GET method we ran into the following…
louis gueye
  • 175
  • 1
  • 8
2
votes
1 answer

Possible side effect using comma in querystring?

I'd like to use , in URL querystring value but it is reserved character. However, we can see many e-commerce sites give comma-galore querystring urls in these days. What do we consider when we use , in querystring? Should it be encoded as %2c…
Youngjae
  • 21,562
  • 14
  • 100
  • 182
1
vote
3 answers

URL parsing test suite

I need to test some existing http:// URL parsing code for compliance to RFC 3986. I do not want to reinvent the wheel and to bump in to various corner cases. Is there some existing comprehensive test suite for that? I do not specify the language I…
Alexander Gladysh
  • 34,198
  • 31
  • 94
  • 153
1
vote
1 answer

URI and double slashes

java.net.URI.create("localhost:8080/foo") // Works java.net.URI.create("127.0.0.1:8080/foo") // Throws exception java.net.URI.create("//127.0.0.1:8080/foo") // Works Is double slash required for when you have the host as an IP Address? I…
Ashwin
  • 10,386
  • 29
  • 103
  • 172
1
vote
0 answers

URL decode with R for RFC1738 (PHP default)

I need to decode with R strings that are URL encoded using RFC 1738. These strings are coming from PHP requests and encoded with the PHP function http_build_query which uses RFC1738 by default. For example, Hello, World! becomes…
asachet
  • 5,784
  • 2
  • 24
  • 59
1
vote
0 answers

W3C RSS Validator: Invalid URL

Validation Page RSS Item I am trying to Validate my RSS Feed using https://validator.w3.org/ I am getting error This feed does not validate. line 2, column 3719: url must be a full URL:…
planet260
  • 1,185
  • 1
  • 11
  • 29