View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0009262 | CMake | CMake | public | 2009-07-12 13:18 | 2016-06-10 14:30 | ||||
Reporter | Eric NOULARD | ||||||||
Assigned To | Bill Hoffman | ||||||||
Priority | normal | Severity | minor | Reproducibility | always | ||||
Status | closed | Resolution | moved | ||||||
Platform | OS | OS Version | |||||||
Product Version | CMake-2-6 | ||||||||
Target Version | Fixed in Version | ||||||||
Summary | 0009262: FILE(DOWNLOAD ) creates file containing HTTP error | ||||||||
Description | When using FILE(DOWNLOAD the error handling behavior is a bit strange. 1) If you get "HTTP 404 Not Found" the STATUS is 0 --> no error 2) When the command fails with "HTTP 404 Not Found" the target file is created and contains the HTML error page. I you want to catch this you have to MATCHES "404 Not Found" in the LOG. The attached cmake scripts (may be launched with cmake -P) show how I did it. Just change the url to a "Not Found" file and see how it behaves. I'd rather want FILE(DOWNLOAD to report HTTP ERROR has error and avoid to match the LOG myself. Has the current behavior has been designed on purpose? | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | getMscStyle.cmake [^] (1,066 bytes) 2009-07-12 13:18 | ||||||||
Relationships | ||||||
|
Relationships |
Notes | |
(0017431) Bill Hoffman (manager) 2009-09-14 12:26 |
Well, it is not really an http error, the web server gave a page pack, it was a page not here page, but it was a page. I don't think curl can tell the difference, and I don't want to parse in cmake, I think... |
(0017448) Eric NOULARD (developer) 2009-09-14 13:27 |
Hi Bill, Agreed you really don't want to parse it in cmake. However, I think libcurl may tell you that it received an http error > 400 if you CURLOPT_FAILONERROR curl option is set to true. If you did set this option to true then CURL will return you CURLE_HTTP_RETURNED_ERROR (22) when an HTTP ERROR is encountered. This should be a similar problem reported on this bug: http://public.kitware.com/Bug/view.php?id=8903 [^] for which I suggested a similar solution :-) Since it works for CTest I bet it should work for "FILE(DOWNLOAD" too. |
(0041578) Kitware Robot (administrator) 2016-06-10 14:27 |
Resolving issue as `moved`. This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2009-07-12 13:18 | Eric NOULARD | New Issue | |
2009-07-12 13:18 | Eric NOULARD | File Added: getMscStyle.cmake | |
2009-09-14 12:26 | Bill Hoffman | Note Added: 0017431 | |
2009-09-14 12:26 | Bill Hoffman | Status | new => assigned |
2009-09-14 12:26 | Bill Hoffman | Assigned To | => Bill Hoffman |
2009-09-14 13:27 | Eric NOULARD | Note Added: 0017448 | |
2011-02-03 18:51 | David Cole | Relationship added | related to 0008903 |
2016-06-10 14:27 | Kitware Robot | Note Added: 0041578 | |
2016-06-10 14:27 | Kitware Robot | Status | assigned => resolved |
2016-06-10 14:27 | Kitware Robot | Resolution | open => moved |
2016-06-10 14:30 | Kitware Robot | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |