Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

436
Visualizações
libcurl - CURLOPT_HTTP_VERSION (HTTP2 without TLS)

libcurl has option CURLOPT_HTTP_VERSION with next parameters:

CURL_HTTP_VERSION_2TLS:

Attempt HTTP 2 over TLS (HTTPS) only.

CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE:

Issue non-TLS HTTP requests using HTTP/2

Doesn 't http 2 work automatically with a TLS Connection ? Can http 2 be with an open non - encrypted connection ?

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Yes, HTTP/2 can work without encryption. But most of implementations supports only encrypted requests. As of mentioned parameters they are described in documentation:

CURL_HTTP_VERSION_2TLS

Attempt HTTP 2 over TLS (HTTPS) only. libcurl will fall back to HTTP 1.1 if HTTP 2 cannot be negotiated with the HTTPS server. For clear text HTTP servers, libcurl will use 1.1. (Added in 7.47.0)

CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE

Issue non-TLS HTTP requests using HTTP/2 without HTTP/1.1 Upgrade. It requires prior knowledge that the server supports HTTP/2 straight away. HTTPS requests will still do HTTP/2 the standard way with negotiated protocol version in the TLS handshake. (Added in 7.49.0)

So CURL_HTTP_VERSION_2TLS has fallback to HTTP 1.1 protocol and CURL_HTTP_VERSION_2_PRIOR_KNOWLEDGE tries only HTTP/2 (with TLS for HTTPS request and without it for HTTP request).

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda