Bugs item #2856638, was opened at 2009-09-11 05:37
Message generated for change (Settings changed) made by bagder
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2856638&group_id=976
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: debug/info output
Group: bad behaviour
>Status: Pending
>Resolution: Later
Priority: 5
Private: No
Submitted By: Noah Misch (guysmiley)
Assigned to: Daniel Stenberg (bagder)
Summary: --fail removes response from --trace data
Initial Comment:
When using --fail, the --trace file also omits the server response.
I expected the-trace0 and the-trace1 to compare equal:
curl --trace the-trace0 http://curl.haxx.se/nosuch
curl --trace the-trace1 --fail http://curl.haxx.se/nosuch
diff -u the-trace0 the-trace1
I see this behavior with 7.19.6, 7.18.0 and 7.12.1.
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Date: 2009-09-14 11:00
Message:
Please go ahead, but I think you might find out that the --fail logic is
aborting things prematurely so that allowing what you suggest might imply
quite a change to the sources.
----------------------------------------------------------------------
Comment By: Noah Misch (guysmiley)
Date: 2009-09-12 05:22
Message:
I used curl --fail to PUT files from a cron job; --fail made curl generate
output (and therefore email from cron) iff the upload failed. When uploads
started failing (HTTP 411 and 412) infrequently, I added --trace so I could
study the entire session after the fact while leaving the process otherwise
undisturbed. To my surprise, when curl next reported the HTTP error, the
associated trace file contained no content reflecting such a response. I
spent some time sarching for an explanation in http.c and chasing other
angles, eventually realizing that --fail was affecting the content of the
trace.
If you see changing this as useful but not justifying your own efforts, I
am happy to try writing the patch.
----------------------------------------------------------------------
Comment By: Daniel Stenberg (bagder)
Date: 2009-09-11 11:42
Message:
The purpose of --fail is to prevent stuff to get written/sent anywhere when
the request didn't succeed. I don't see the benefit of making a lot of
effort to make sure --trace works identically with --fail as without it.
Why is this important to you?
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=100976&aid=2856638&group_id=976
Received on 2009-10-01