jakartaee / jakartaee/rest

UriBuilder.fragment() encodes certain "reserved sub-delimiters" as defined in RFC 3986

Open
#541 3 comments 0 reactions 1 assignee Claimed by @glassfishrobot View on GitHub
Dominant language
Java
Stars
400
Forks
143
PR merge metrics
No merged PRs in 30d

Description

A DESCRIPTION OF THE PROBLEM :
A fragment URI with reserved subdelimiters per RFC 3986 (excluding "+", "=" and "&") cannot be built with UriBuilder without encoding.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Example:
URI uri = UriBuilder.fromPath("

{arg1}

")
.fragment("

{arg2}

")
.scheme("http")
.host("example.org")
.build("test", "xywh=1,2,3,4");

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
[http://example.org/test#xywh=1,2,3,4](http://example.org/test#xywh=1,2,3,4)
ACTUAL -
[http://example.org/test#xywh=1%2C2%2C3%2C4](http://example.org/test#xywh=1%2C2%2C3%2C4)

REPRODUCIBILITY :
This bug can be reproduced always.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.