Navigation Menu

Skip to content

Commit

Permalink
scitoken: fix remote reading of JSON with UTF-8 CharSet
Browse files Browse the repository at this point in the history
Motivation:

dCache fails to discover SciToken/OAuth JSON documents if the
OAuth server advertises the charset as "utf-8".

Modification:

Include "utf-8" as a valid alias for "utf8".

Result:

dCache can now work with OPs that use "utf-8" charset.

Target: master
Request: 5.2
Request: 5.1
Request: 5.0
Request: 4.2
Requires-notes: yes
Requires-book: no
Patch: https://rb.dcache.org/r/11911/
Acked-by: Lea Morschel
  • Loading branch information
paulmillar committed Aug 13, 2019
1 parent a839c27 commit 069d9eb
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -170,6 +170,7 @@ private static Charset readCharset(HttpResponse response) throws IOException
case "us-ascii":
charset = StandardCharsets.US_ASCII;
break;
case "utf-8":
case "utf8":
charset = StandardCharsets.UTF_8;
break;
Expand Down

0 comments on commit 069d9eb

Please sign in to comment.