Allow the cURL transport to use native HTTP protocol negotiation
I maintainer di solito rispondono entro 9 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- php
- Ambito
- api, networking
Direzione di ricerca
Inizia tracciando la gestione di protocol_version nei transport cURL e fsockopen, incluso il modo in cui viene impostato CURLOPT_HTTP_VERSION. Determina se una modalità auto o null debba lasciare a cURL la selezione del protocollo, preservando al contempo il comportamento HTTP/1.x per fsockopen. Convalida il risultato con CURLINFO_HTTP_VERSION utilizzando un server di test compatibile con HTTP/2 e conferma il fallback a HTTP/1.1.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Is your feature request related to a problem?
Requests defaults protocol_version to HTTP/1.1 and the cURL transport therefore explicitly sets:
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1
This prevents libcurl from using its native HTTP protocol negotiation, even when both libcurl and the server support HTTP/2 or newer protocols.
This is related to #381 and PR #918, but is intentionally narrower. Instead of adding explicit HTTP/2 / HTTP/3 support, this issue is about allowing capable transports to choose the protocol themselves.
Describe the solution you'd like
Add a way to request transport-native protocol negotiation, for example with null or "auto".
Conceptually:
1.0 -> force HTTP/1.0
1.1 -> force HTTP/1.1
auto -> let the transport decide
For cURL, auto would mean not setting CURLOPT_HTTP_VERSION and letting libcurl negotiate the protocol.
For fsockopen, Requests could continue using the HTTP/1.x version it supports.
Describe alternatives you've considered
PR #918 adds explicit 2.0 and 3.0 protocol versions, but that also introduces questions around transport capabilities, HTTP/3 and testing infrastructure.
Another workaround is changing the cURL handle through hooks, but that requires downstream applications to know that Requests otherwise forces HTTP/1.1.
Additional context
This came up while investigating HTTP/2 support in WP-CLI.
A native-negotiation mode could be tested using CURLINFO_HTTP_VERSION against an HTTP/2-capable test server, while preserving HTTP/1.1 fallback when HTTP/2 is unavailable.
The main design question is whether protocol_version should always dictate the protocol for every transport, or whether protocol selection can remain a transport capability when the caller does not explicitly request a version.
- Lingua principale
- PHP
- Stelle
- 3.6k
- Fork
- 503
- Merge medio
- 10g 23h
- PR unite (30g)
- 5
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di WordPress/Requests
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 73/100
I maintainer di solito rispondono entro 9 giorni
-
Release checklist for 2.0.22ApertaType: meta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 25/100
I maintainer di solito rispondono entro 9 giorni
-
Review which characters should be `trim`med for cookie and header dataForse già presa @asllanmaciel l’ha presa 42 giorni fa. ApertaStatus: help wanted Type: testing/chores/QA
Difficoltà 4/5 3-5 giorni Idoneità per principianti 62/100
WordPress/Requests#1084 · 3 commenti ·
I maintainer di solito rispondono entro 9 giorni
-
testSNISupport no longer verifies SNIForse di nuovo libera Una pull request per questa issue è stata chiusa senza essere unita. ApertaComponent: Transports Status: help wanted Type: testing/chores/QA
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
WordPress/Requests#1077 · 1 commento ·
I maintainer di solito rispondono entro 9 giorni
-
Support fror QUERY HTTP methodForse già presa Una pull request collegata a questa issue è aperta o già unita. ApertaComponent: Core Type: enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
I maintainer di solito rispondono entro 9 giorni
Tutte le issue di WordPress/Requests
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
wp-graphql/wp-graphql-woocommerce#1026 ·
-
ServiceMapMissingAnalyser reads @method in docblock prose as a tag and reports a phantom accessorApertaagent-ready area:static-analysis bug p3
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
gacela-project/gacela#1050 ·
I maintainer di solito rispondono entro 1 giorno
-
Navigation Container's menu button needs the pointer cursorForse già presa @bd-viget l’ha presa oggi. Aperta
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 82/100
vigetlabs/wordpress-site-starter#322 ·
I maintainer di solito rispondono entro 15 giorni
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 85/100
spatie/laravel-medialibrary#3972 ·