grpc / grpc/grpc-java

Support for opaque "target" URIs with empty scheme-specific part per RFC 3986

Open
#12,244 7 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Java
Stars
12.1k
Forks
4k
Avg merge
2d 17h
Merged PRs (30d)
37

Description

grpc-java appears to interpret "targetUri"s using the original RFC 2396 URI syntax from 1998. Unfortunately this means that it fails to parse the output of `toUri(URI_INTENT_SCHEME)` for many Android Intents, in particular, any Intent without a data URI. These are very common and encode all the non-URI fields in a fragment, like:

`intent:#Intent;package=p;action=a;category=c;end;`

`ManagedChannelImplBuilder` fails to pass a target string like this to the `NameResolverProvider` registered for "intent:" because `java.net.URI()` throws `java.net.URISyntaxException`: "Expected scheme-specific part at index 7"

In 2005, RFC 3986 revised the URI syntax to allow an empty scheme-specific part (among other relaxations). It would be nice if grpc-java could tolerate these too.

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.