DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
FREEDOM251

Freedom251 › Blog › Command Line

How to Temporarily Disable HTTP/2 in curl Until Your Systems Are Patched

By Freedom251 Team · · 9 min read

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Force curl to use HTTP/1.1 for an individual request with --http1.1:

curl --http1.1 https://example.com

This changes the protocol negotiated for that invocation without changing your URL, credentials, headers, retry policy, proxy, or certificate checks. Use it as a temporary compatibility or security-workaround measure while curl, libcurl, a server, proxy, or gateway is being patched. Once the relevant updates are installed and verified, remove the option so normal protocol negotiation can resume.

As an Amazon Associate I earn from qualifying purchases.

The one-command workaround

The curl option --http1.1 explicitly selects HTTP/1.1. Add it to the affected command, keeping every other argument the same:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl --http1.1 https://example.com

The long option is also available in its short form, --http1.1 being the clearest spelling in scripts and incident notes. The curl manual describes it as “(HTTP) Use HTTP version 1.1.” It is mutually exclusive with --http2, --http2-prior-knowledge, --http1.0, and HTTP/3 options, so do not try to combine those protocol selectors.

#1 Best Overall
Sale
TOZO A1 Wireless Earbuds Bluetooth 5.3 Light Weight in Ear Headphones | IPX5 Waterproof,2 Mics for AI Calls,Immersive Premium Sound Bass Headset with Charging Case,32 EQ via App Black
  • [Ultra-Lightweight Ear Buds Designed for Small Ears] Each earbud weighs only 3.7g and features a compact, ergonomic in-ear design made especially for small ears. Secure, low-profile, and comfortable for workouts, all-day wear or overnight sleeping.The ultra-slim profile sits flush in your ear with no hard edges poking or rubbing, so you can even sleep on your side without discomfort.
  • [Immersive Stereo Sound with TOZO OrigX Technology] TOZO OrigX tuning delivers clear vocals, balanced mids, and natural stereo sound for music, podcasts, and videos.
  • [Long Battery Life for Daily Use] Get up to 7 hours of playtime on a single charge, with up to 32 hours total using the charging case—ideal for workdays, commuting, and extended listening sessions.
  • [Bluetooth 5.3 & Stable Connection] Bluetooth 5.3 provides fast pairing, stable wireless performance, and reduced dropouts as you move around home or office.
  • [Deep Bass with Clear Vocals] High-performance drivers produce punchy bass while keeping vocals clean and detailed for everyday listening.

This is a per-invocation setting. It does not disable HTTP/2 on the remote server, remove HTTP/2 support from curl, or change another application using the same host. Those properties make it suitable for a narrow patch window: constrain only the requests that need the workaround, document the exception, and remove it after remediation.

What changes for HTTPS and HTTP URLs

HTTPS requests

For an HTTPS URL, curl commonly offers and negotiates HTTP/2 when the local build supports it and the server does too. Adding --http1.1 makes curl use HTTP/1.1 instead, preventing that request from negotiating HTTP/2. TLS encryption remains enabled; only the application-layer HTTP protocol selection changes.

The server still receives a normal HTTPS request. Authentication, request headers, cookies, redirects, uploads, downloads, proxy settings, and certificate validation continue to follow the other options in your command. If a problem is specifically triggered by an HTTP/2 path, this narrower change can restore service while you patch the underlying components.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Cleartext HTTP requests

For a plain http:// URL, curl already defaults to HTTP/1.1. In that case, the flag usually does not change the wire protocol. It can still be useful when one wrapper handles both HTTP and HTTPS, or when making the intended protocol explicit in a command, code review, or log.

Do not infer that a cleartext request has been made secure by adding this option. --http1.1 selects HTTP/1.1; it does not add TLS. Use an https:// URL when transport encryption is required.

Apply the workaround safely

  1. Identify the failing request. Capture the exact command, URL, authentication method, headers, proxy variables, retry options, and certificate settings. Avoid changing several variables at once.
  2. Add the protocol selector. Insert --http1.1 next to the other curl options. For example:
    curl --retry 3 --compressed --http1.1 https://api.example.com/data
  3. Run the smallest useful test. Start with a harmless endpoint or the same health check used by the failing job. Confirm the expected status code and response body before changing a whole fleet.
  4. Propagate only to affected scopes. Update the specific shell script, wrapper, CI step, service unit, or scheduled task. If multiple jobs share a wrapper, make the change there rather than editing every call site, but verify that all callers can use HTTP/1.1.
  5. Record the exception. Note why the flag was added, which systems are covered, who owns the update, and the condition for removal. A temporary protocol override can otherwise become permanent technical debt.
  6. Patch the underlying components. Update curl or libcurl and any affected server, proxy, gateway, or other infrastructure according to the applicable security advisory. The correct target depends on the installed version and the specific advisory; curl’s vulnerability table distinguishes affected and fixed versions.
  7. Verify before rollback. Retest without the flag in a controlled environment, then remove it from the wrapper or job. Keep the old command available for a short, documented rollback window if your change process requires one.

Command patterns you can adapt

GET request

curl --http1.1 https://example.com/status

The URL and response handling are unchanged; only protocol selection is forced.

Rank #2
Sale
Smart Watch for Men Women Compatible with iPhone Samsung Android Phone 1.69 inch Full Touch Screen IP68 Waterproof Bluetooh Fitness Tracker Heart Rate/Sleep Monitor (Black)
  • 【IP68 Waterproof Multifunctinal Smart Watch】Torjalph fitness activity tracker smart watch is IP68 waterproof technology ,you can wear it when swimming,handwashing,it's rain-proof which means that you perform multiple exercise modes outside without worrying about sweat or rain corroding your fitness smart watch,and this watch equipped with a 230 mAh large capacity battery magnetic charging ,and this sports activity tracker watch can be used 5-7 days If fully charged.
  • 【Larger 1.83'' Full Screen Watch & Multi-dial Selection】1.83 inch full HD color touch screen smart watch for men / women provides excellent 240*284 resolution image quality ,This Bluetooth smart watch offers a better touch experience and remarkable immersion and ,more than 200 watch faces for you to choose from App"Da Fit ", you can change the dial style according to your mood to wear keeping the world on your wrist
  • 【Accurate Activity Tracker Smart Watch 】sports watch activity tracker uses sweat and dust resistant breathable silicone strap, our Fitness Tracker Smart Watch for Android iOS Phones supports 12 sports modes,walking,running,bicycle,swimming,badminton,basketball,football,rope skipping. This bluetooth calls smart watch for men women is lightweight and stylish, bringing more convenient and relaxing sports experience while also providing more protection.
  • 【Your 24 Hour Personal Daily Health Monitor】Fitness watch for women men full touch screen IP67 waterproof bluetooth smartwatch for Android iOS Phones with heart rate blood pressure monitor multifunction Andriod smart watch with steps counter sleep monitor sports fitness watch, monitoring blood oxygen saturation allows you to understand your physical condition in real time to track fitness progress ,to know your health status in time.
  • 【More Functions Bluetooth Call Smart Watch】This fitness activity smart watch full screen for iPhone and Android phones includes a bunch of new features including:The bluetooth smart watch can hang up the phone, receive and display WhatsAPP /Text /Facebook /Twitter /Messenger reminder.Support sedentary reminder, alarm clock, stopwatch, timer,weather information,music control, remote camera control compatible with Android 5.0 and above or iOS 9.0 and above smartphones.

POST with a request body

curl --http1.1 -X POST https://api.example.com/items 
  -H 'Content-Type: application/json' 
  --data '{"name":"sample"}'

Keep the method, headers, and payload exactly as they were in the failing command. The workaround is not a reason to remove content negotiation, authentication, or retry controls.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Authentication and headers

curl --http1.1 -u "$API_USER:$API_TOKEN" 
  -H 'Accept: application/json' 
  https://api.example.com/account

Use the same secret-handling practice as before. The protocol option does not sanitize credentials or alter how curl reads them.

Uploads and downloads

curl --http1.1 -F '[email protected]' https://upload.example.com/import
curl --http1.1 -o result.zip https://download.example.com/result.zip

Large transfers may have different performance characteristics under HTTP/1.1, especially when a workload previously benefited from HTTP/2 multiplexing. Treat any throughput or connection-count change as an operational effect to monitor, not as evidence that the workaround failed.

Proxies, retries, and certificates

curl --http1.1 --proxy http://proxy.internal:8080 
  --retry 4 --connect-timeout 10 
  --cacert /etc/ssl/certs/company-ca.pem 
  https://service.example.com/health

Leave proxy and certificate options intact unless they are independently implicated. Changing them at the same time makes it difficult to determine whether HTTP/1.1 solved the original problem.

How to confirm which protocol was used

Use curl’s verbose mode on a test request:

curl --http1.1 -v https://example.com/

Inspect the diagnostic output and the response exchange. The request should be identified as HTTP/1.1, and the connection should not show an HTTP/2 negotiation. Redirects deserve special attention: with -L, curl can contact several hosts, so test the complete redirect chain rather than only the first URL.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl --http1.1 -L -v https://example.com/start

For an automated check, capture verbose output separately from the response body and make the job fail if the request still reports an HTTP/2 exchange. Keep such checks tied to the temporary exception; once the flag is removed, update the assertion to reflect the protocol policy you actually want.

Rank #3
New Bee Guitar Cable 10ft Electric Instrument Bass AMP Cord | 6.35mm Jack, Durable Design, Stage and Home Studio Use, Low Noise Shielded Electric Cord for Bass, Keyboard, Amp, Mixer
  • [Low Noise High Fidelity] New bee guitar cord with 22AWG oxygen-free-copper center conductors provides enhanced signal transfer, the PVC insulation material and the high-density stranded copper double shield provide noise rejection for quiet operation
  • [Ideal for Choice] New bee 1/4 straight and right angle metal connectors, ensures a secure connection in any instrument, pedal, or amp jack. L shape great fro on stage guitar stands
  • [Wide Compatible] Suitable for mixer, power amplifier, microphone, effector, decoder, equalizer, electoronic organ, electric guitar, electric bass and other electronic equipments. Widely used in the installation of smart home, karaoke speaker, professional stage audio, etc
  • [Easy Disassemble] Making incidental repairs quick and easy! Very nice, flexible cable
  • [Dont Hesite to Order] 24 hours customer services and professional technology team are standing by

A successful status code alone is not proof that every hop used HTTP/1.1. A forward proxy, TLS-terminating gateway, redirect target, or service mesh can negotiate its own protocol on another leg. If the incident involves infrastructure between curl and the origin, inspect the relevant component’s logs as well.

Choosing the right scope

Approach Protocol selected Scope Best use Trade-off
curl --http1.1 URL HTTP/1.1 One invocation Reproducing an issue or protecting a single command Every caller that needs the workaround must include the option
Wrapper or shell function containing --http1.1 HTTP/1.1 All calls through that wrapper Several scripts share one controlled entry point Callers that bypass the wrapper are not covered
CI or scheduled-job configuration HTTP/1.1 One pipeline, task, or environment Containing a known failing automation path Configuration drift can leave the exception in place after patching
Fleet-wide policy Usually HTTP/1.1 for every affected curl caller Broad operational scope Only when the exposure is widespread and centrally managed Greater compatibility and performance impact; rollback requires coordination

Start with the smallest scope that mitigates the problem. Expand only after confirming which clients, destinations, and intermediary devices are affected. A policy that forces HTTP/1.1 everywhere can increase connection overhead and hide which systems still need remediation.

Do not use HTTP/2 options as disable switches

--http2-prior-knowledge does the opposite of the requested workaround. It tells curl to issue HTTP/2 directly for a non-TLS connection when you already know the server supports it. For HTTPS, it controls the ALPN offer used during protocol negotiation. It is an enablement or assumption option, not a fallback to HTTP/1.1.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If a script previously set --http2-prior-knowledge, remove that setting or use the documented --no-http2-prior-knowledge form to turn that mode off. Then select the desired protocol explicitly with --http1.1 when you need a deterministic HTTP/1.1 request.

Likewise, --http2 requests HTTP/2 and cannot be combined with --http1.1. HTTP/1.0 and HTTP/3 selectors are different protocol choices with different compatibility implications; do not substitute them for this mitigation unless the service owner has tested that specific requirement.

Troubleshooting after adding --http1.1

The command still fails before an HTTP response

Check DNS resolution, TCP reachability, proxy access, TLS certificate validation, and authentication separately. The flag cannot fix a name-resolution failure, an expired certificate, a blocked port, or an invalid token. Compare verbose output from the original and modified commands while keeping all non-protocol options identical.

Rank #4
BSIMB 15.6" Digital Family Calendar & Chore Chart, No Subscription Fees
  • Digital Family Calendar: BSIMB digital calendar wall touch screen puts an end to your chaotic life. Designed for busy families, the digital calendar keeps you organised and in step with your family. Assign different colours and tasks to each family member to make family scheduling easier and more intuitive.
  • Easy Setup and Auto-Sync: Plug in, connect to WLAN and auto-syn your electric calendar in minutes. Digital wall calendar compatible with Google calendar, iCloud calendar, Outlook calendar, Cozi calendar and Yahoo calendar. Add events directly on the device or through the ecalendar app. Electronic calendar stays current whether you're at work or traveling—no manual updates needed.
  • All-In-One Home Assistant: Smart calendar builds habits and encourage independence with personalised chores. Display daily meal plan to reduce the daily ‘What's for dinner?’ stress. To-do lists keep track of everything you want. Turning chores into valuable achievements with stars and rewards, making life easier and more enjoyable.
  • Manage Anytime Anywhere: BSIMB electronic calendar for family stay connected with the powerful ecalendar app. Access and manage your digital wall calendar anytime, anywhere with free features like stars & rewards, photo screensaver, chore charts, meals plans, to-do lists etc. Electronic planner paid features like Magic Import tailor advanced tools for users with special needs.
  • Stay in Touch with Loved Ones: Share photos or videos from your phone to electronic wall calendar with app, instantly update your life moment, and keep in touch with your family, especially those who are far away; you can also surprise your smart calendar digital wall by sending him a wish card; it's also great for keeping tech-illiterate elders in touch with the youngsters.

The server returns an HTTP error

Some services expose different routing, authentication, or feature behavior by protocol. Confirm that the HTTP/1.1 request reaches the expected host and path, then review the server or gateway logs. Preserve the response status and body when escalating; they can show whether the request was rejected by the origin or by an intermediary.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

A redirect appears to reintroduce HTTP/2

Test with -L -v and inspect every hop. The destination may be a different command, client, or service, or a wrapper may invoke curl again without the flag. Add the option to each curl invocation that performs a network request, not only to the first command in a pipeline.

Performance gets worse

HTTP/1.1 does not provide the same multiplexing behavior as HTTP/2. Requests that previously shared a connection may now use separate connections or wait for earlier transfers, depending on the client and workload. Measure queue time, connection counts, latency, and transfer rate in the affected job, and limit the workaround to the smallest necessary scope.

A script rejects the option

Verify the curl version and the actual binary being executed. A wrapper, restricted runtime, or alternate implementation may not be the binary you tested interactively. Run the same command in the CI image, container, service account, or scheduled-task environment where the failure occurs.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Patch and remove the exception

Forcing HTTP/1.1 is not a substitute for security updates. It reduces exposure to an HTTP/2-specific failure mode for the requests on which it is applied, but it does not repair vulnerable curl or libcurl code, a server, a proxy, or a gateway. Follow the relevant advisory’s affected-version and fixed-version guidance rather than assuming that any newer package is sufficient.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

After patching, verify the complete path: the curl or libcurl client, the destination service, and any intermediary that terminates or re-creates connections. Run the same functional and security tests that justified the workaround. Then remove --http1.1, restore the original command, and monitor for the original symptom.

Keep a record of the removal date and the versions deployed. If the issue returns, reapply the narrowly scoped flag while investigating instead of silently leaving a permanent fleet-wide override.

Operational checklist

  • Use --http1.1 on each affected curl invocation.
  • Keep URL, credentials, headers, retries, proxy, and certificate options unchanged.
  • Remember that HTTPS may otherwise negotiate HTTP/2 when both sides support it.
  • Remember that cleartext HTTP already defaults to HTTP/1.1.
  • Use verbose output and, when necessary, intermediary logs to verify the protocol on each hop.
  • Do not use --http2 or --http2-prior-knowledge as disable switches.
  • Document the temporary exception and its owner.
  • Patch curl/libcurl and affected infrastructure according to the applicable advisory.
  • Remove the flag after verification so normal negotiation can resume.

Frequently Asked Questions

Can I put --http1.1 before or after the URL?

curl generally accepts options before the URL, and placing protocol options with the other flags makes scripts easier to audit. Keep the option in the same command invocation as the URL it should govern.

Does forcing HTTP/1.1 change TLS encryption?

No. With an https:// URL, TLS remains in use; the option selects HTTP/1.1 as the application protocol instead of allowing HTTP/2 negotiation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Do I need the flag for every plain HTTP request?

Usually not. curl already defaults to HTTP/1.1 for cleartext http:// URLs. Add it there only when a shared command or explicit logging policy benefits from spelling out the choice.

Will the option disable HTTP/2 for every program on the machine?

No. It applies only to that curl invocation, or to the wrapper, job, or policy where you add it. Other applications and commands retain their own protocol behavior.

What if my application uses libcurl instead of the curl command?

The command-line flag does not automatically affect libcurl callers. Apply the equivalent HTTP-version setting in the application’s libcurl configuration, then test that program in its real runtime environment.

Should I leave the workaround in place after updating packages?

No. Once the client and affected infrastructure are patched and the original behavior is verified, remove the temporary override. Leaving it indefinitely can reduce performance and conceal incomplete remediation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Command LinecurlHTTP/1.1HTTP/2security patchingTroubleshooting

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.