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: %{filename_effective but not transmit file?
- Contemporary messages sorted: [ by date ] [ by thread ] [ by subject ] [ by author ] [ by messages with attachments ]
From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Wed, 11 Sep 2024 20:56:22 -0600
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 $
Date: Wed, 11 Sep 2024 20:56:22 -0600
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.htmlReceived on 2024-09-12