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
1
vote
1 answer

How is an a tag with href="./etc" resolved? Chrome not adhering to RFC 3986?

If I'm on a site example.com/foo/index.html, and there is an a tag with href ./bar/test.html, I expect the URL of the linked document to be example.com/foo/bar/test.html. However, in web browsers such as Chrome or Firefox, this behavior seems to be…
dani-sc
  • 308
  • 1
  • 8
1
vote
2 answers

Why java.net.URI does not encode all reserved characters? (java 11)

I want to create an instance of java.net.URI using individual URI components, namely: scheme userInfo host port path query fragment There is a constructor in java.net.URI class that allows me to do it, here is a code from the library: public…
shotex
  • 349
  • 5
  • 10
1
vote
1 answer

Is there a way to fetch a URL that ends with a dot-segment?

My goal is to fetch a URL that ends with a dot-segment, so a URL that ends with a literal dot/period: . Example: I expected the following invocation of fetch to result in an HTTP GET request on the base URI of the site with the path /api/users/.…
ckunz
  • 11
  • 1
1
vote
2 answers

different between python and ruby when parsing URL path, which is valid?

I have a URL string as: url = "https://foo.bar.com/path/to/aaa.bbb/ccc.ddd;dc_trk_aid=486652617;tfua=;gdpr=;gdpr_consent=?&339286293" when using Python from urllib.parse import urlparse url_obj = urlparse(url) url_obj.path #…
Zou Googi
  • 43
  • 1
  • 6
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
  • 12,691
  • 31
  • 118
  • 190
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
  • 6,620
  • 2
  • 30
  • 74
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,384
  • 1
  • 14
  • 30
1
vote
0 answers

userinfo component in Flask URL

I would like for my users to connect to my Flask app using a syntax such as: http://username:password@myapp.com/ as defined by RFC 3986 (chapter 3.2). Is there a way I can access the username:password part from Flask? On my local server, if I…
Arnaud
  • 750
  • 10
  • 25
1
vote
3 answers

PHP: comparing URIs which differ in percent-encoding

In PHP, I want to compare two relative URLs for equality. The catch: URLs may differ in percent-encoding, e.g. /dir/file+file vs. /dir/file%20file /dir/file(file) vs. /dir/file%28file%29 /dir/file%5bfile vs. /dir/file%5Bfile According to RFC…
Justin Grant
  • 44,807
  • 15
  • 124
  • 208
1
vote
1 answer

What's the danger of not encoding brackets in URL?

I have read this question: Is it ok to have brackets in URL? and the related RFC 3986. Answers to this question say that [ and ] are classified as gen-delims by the RFC and should therefore be encoded, but do not explain how failing to do so would…
BenMorel
  • 34,448
  • 50
  • 182
  • 322
0
votes
1 answer

Webhook Connection Override Extensions RFC?

I'm working with Twilio webhooks for Programmable Voice, writing some simple TwiML responses in a Go API. Reviewing the Webhook Connection Overrides doc, I see a general link to https://en.wikipedia.org/wiki/URL. Are URL extensions a standard HTTP…
tommy_o
  • 3,640
  • 3
  • 29
  • 33
0
votes
2 answers

What do * / ( and [ mean in the rfc 3986 URI syntax description?

Reading through the URI syntax description (RFC 3986) and trying to understand what their syntax descriptions mean. For example, a URI has to have a schema part, which is restricted by the following syntax description: scheme = ALPHA *( ALPHA /…
Sven Voigt
  • 91
  • 7
0
votes
0 answers

Is %encoded format allowed for IPv4address format of host of uri in RFC 3968?

I am trying to create a URI library from the RFC 3986 definitions. While validating host there are 3 allowed formats: IP-literal IPv4address Reg-name Here IPv4address's format is little ambiguous (or I am making a mistake in understanding that).…
Rusty
  • 1,086
  • 2
  • 13
  • 27
0
votes
0 answers

What is the best way to name a URL when you can do both 'unique identifer' based as well as 'hierarchy based' resource naming ? Pros and cons of each

Lets say we have a resource structure like below GUID Region Country State StateDetails a120c850-e296-4563-8fb9-31d0192aef75 EMEA FR Normandy Statedetails 6f4b3ca6-c992-42dd-b1e3-8c8f8ba62886 APAC AU New South…
0
votes
0 answers

Mimicking PHP http_build_query function in Java

I'm looking for a Java alternative to http_build_query PHP method https://www.php.net/manual/en/function.http-build-query.php. "https://anydomain.com", "params" => "test", "timestamp" => "123"); echo…
user994612
  • 35
  • 5