Support for opaque "target" URIs with empty scheme-specific part per RFC 3986
- Lingua principale
- Java
- Stelle
- 12.1k
- Fork
- 4k
- Merge medio
- 2g 17h
- PR unite (30g)
- 37
Descrizione
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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia da ManagedChannelImplBuilder e segui come viene analizzato targetUri prima di raggiungere il NameResolverProvider registrato per lo schema intent:. Riproduci il fallimento con intent:#Intent;package=p;action=a;category=c;end; e ispeziona la gestione esistente degli URI e i test correlati. Il lavoro è completato quando una destinazione opaca con una parte specifica dello schema vuota viene accettata e passata al resolver.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- java
- Ambito
- networking
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 45/100