curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. 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 himself.

Re: How can I just get the output name?

From: Dan Fandrich via curl-users <curl-users_at_lists.haxx.se>
Date: Tue, 26 Mar 2024 10:26:40 -0700

On Tue, Mar 26, 2024 at 11:08:01AM -0600, Paul Gilmartin via curl-users wrote:
> On 3/26/24 10:10:57, Dan Fandrich via curl-users wrote:
> >
> > This will do it:
> >
> > curl -sI -o /dev/null --write-out '%header{content-disposition}\n' \
> > https://dl.duosecurity.com/duo-win-login-latest.exe | \
> > sed -e 's/^.*="//' -e 's/".*$//'
> >
> > This requests only the headers from the site and writes out just the
> > Content-Disposition: header, ...
> > .
> Does that transfer and discard the entire payload, thus spending
> time and bandwidth?

"This requests only the headers", not the payload. You can run
"curl -sIv https://dl.duosecurity.com/duo-win-login-latest.exe" to see
everything transferred.
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2024-03-26