curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

Re: How to dry-run a http request

From: Dan Fandrich via curl-library <curl-library_at_lists.haxx.se>
Date: Mon, 17 Feb 2025 10:07:05 -0800

> This is perhaps a tangent, but I could not get
> CURLOPT_SERVER_RESPONSE_TIMEOUT_MS to do anything at all.

Hmmm, it seems CURLOPT_SERVER_RESPONSE_TIMEOUT_MS only works for protocols that
use libcurl's internal "ping-pong" abstraction, which includes FTP, IMAP, POP3
and SMTP but not HTTP. I don't know if there's a good reason behind that. You
may need to use CURLOPT_LOW_SPEED_TIME and CURLOPT_LOW_SPEED_LIMIT
instead, but that has a 1 second minimum timeout. An alternative is to just set
an overall timeout with CURLOPT_TIMEOUT_MS but there's a danger that on an
overloaded system it will timeout before the request is sent and logged.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-02-17