Re: %{filename_effective but not transmit file?
Paul Gilmartin via curl-users <[email protected]> Wed, 11 Sep 2024 20:56:22 -0600
| Newsgroups | gmane.comp.web.curl.general |
|---|---|
| Message-ID | <[email protected]> |
On 9/11/24 19:09, Dan Fandrich via curl-users wrote:
> On Wed, Sep 11, 2024 at 05:47:50PM -0600, Paul Gilmartin via curl-users wrote:
>> Is it possible to get %{filename_effective without transmitting
>> the file? I'm trying to make the ETag name pend on that,
>> something like:
>> "--etag-compare %{filename_effectiv.etag"
>>
>> So far, the best I can do is perform a trial fetch, directing
>> the output to a read-only directory, failing but returning
>> %{filename_ effective and using that in the real fetch.
>
> Adding --head should basically do that in a clean way.
> .
Close, but not quite. what I really want is:
614 $ cat h
#! /bin/sh -x
curl --head \
--remote-name \
--remote-header-name \
--write-out '%{filename_effective}\n' \
'https://ibm-docs-static-content.s3.us.cloud-object-storage.appdomain.cloud/pdx/SSLTBW_3.1.0/zOS310-Refresh-Indexed-PDF-package-(2024-07-31).zip'
But it fails with:
615 $ sh h
curl: showing headers and --remote-header-name cannot be combined
curl: try 'curl --help' or 'curl --manual' for more information
616 $
--
Thanks,
gil
--
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette: https://curl.se/mail/etiquette.html