Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Make it possible to tell if an OkHttpClient/Interceptor.Chain is using a non-default sslSocketFactory

Aperta
#9,744 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
kotlin
Ambito
backend

Direzione di ricerca

Start by reading okhttp/src/commonJvmAndroid/kotlin/okhttp3/OkHttpClient.kt around the field initialization cited in the issue, then follow how Interceptor.Chain.sslSocketFactoryOrNull is exposed and how withSslSocketFactory changes the chain. The issue asks for a way to distinguish a user-provided factory from the default; done means an application interceptor can make that distinction without confusing the default instance with an override.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

We would like to know, in an application interceptor, if the user is using a custom SSLSocketFactory, i.e. they called OkHttpClient.Builder.sslSocketFactory or Interceptor.Chain.withSslSocketFactory.

This is because, if the user is using the default SSL Socket Factory, our interceptor can use its own SSL implementation with little risk of contradicting the user's intent. The interceptor should ideally refrain from doing this if the user overrode the option.

Currently this doesn't really seem to be feasible. Indeed, if the user does not specify this option, OkHttp sets the field to a new instance, which means Interceptor.chain.sslSocketFactoryOrNull cannot be compared against null or some default instance.

@yschimke @vkasprov

Lingua principale
Kotlin
Stelle
47.1k
Fork
9.3k
Merge medio
18h 18m
PR unite (30g)
15

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di lysine-dev/okhttp

Tutte le issue di lysine-dev/okhttp

Issue simili

Altre issue su Kotlin

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.