Bug 449369

Summary: curl --remote-time (-R) does not work
Product: [Fedora] Fedora Reporter: Stepan Kasal <kasal>
Component: curlAssignee: Jindrich Novy <jnovy>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-02 15:04:25 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Stepan Kasal 2008-06-02 14:00:03 UTC
Description of problem:
curl -R does not work

Version-Release number of selected component (if applicable):
curl-7.18.1-2.fc10

How reproducible:
always

Steps to Reproduce:
1. touch stamp-file
2. curl -R an-URL-to-a-small-file
3. observe that a-small-file is newer than stamp-file

Additional info:
curl has a "feature" where an option is switched on iff it has been given odd
times and off if it has been given even times.

Obviously, it is then very important that the default does not change.

The version of curl quoted above has -R switched on by default.  Then each
script which tries to get timestamps right actually switches timestamping off.
An example of such a script is common/Makefile.common from cvs.fedoraproject.org

Comment 1 Stepan Kasal 2008-06-02 15:04:25 UTC
Sorry, it was my fault, I had -R in .curlrc.
Obviously, whith the "switch the option" kind of interpretation of options, one
should never have .curlrc, as it breaks all the scripts.
It would make sense to put a warning ".curlrc should not touch the default
option, it breaks scripts" to curl, but that would probably annoy other people.
I'll just refrain from using the misdesigned command line interface (rpm -e curl).

Comment 2 Stepan Kasal 2008-06-03 14:23:51 UTC
Actually, upstream reacted really nicely to the complaint (it wasn't the first
one of this type):
http://daniel.haxx.se/blog/2008/06/03/curl-needs-a-fresh-take-on-command-line-options/

So the problem may actually get solved in a future release of curl.