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

Support pre-emptive Proxy Authentication for plaintext (http) requests

Aperta
#9,239 5 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Da chiarire
Stato di attività
Ferma
Stack tecnologico
java, kotlin
Ambito
networking

Direzione di ricerca

Start by reading the mentioned createTunnelRequest logic and how authenticate handles proxy challenges. Clarify whether the requested work is pre-emptive Proxy-Authorization for plaintext HTTP, and establish the relevant standard behavior before proposing a change. Done means the expected behavior and scope are agreed, with tests covering the chosen HTTP proxy-authentication interaction.

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

Descrizione

bug

I want to use okhttp to implement --proxy-user so that the header includes Proxy-Authorization. I found that authenticate can achieve this, and it indeed works under HTTPS. However, once I send an HTTP request, like:

Request request = new Request.Builder()
.url("http://httpbin.org/headers") // This service returns the received request headers
.header("saaa", "bbb")
.build();
This header is not automatically added. I looked at the underlying source code and found that createTunnelRequest creates a fakeAuthChallengeResponse, which explains why it appears to be mandatory.

My first question is: Why isn't HTTP designed in the same way?
My second question is: After returning 407, HTTP also includes Proxy-Authorization. Is this interaction defined by a standard?

Thank you for your answer.

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

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.