Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

432
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!