View Issue Details [ Jump to Notes ] | [ Print ] | ||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | ||||
0015774 | CMake | CTest | public | 2015-10-07 17:49 | 2016-03-07 09:12 | ||||
Reporter | Derek Bruening | ||||||||
Assigned To | Brad King | ||||||||
Priority | low | Severity | block | Reproducibility | always | ||||
Status | closed | Resolution | fixed | ||||||
Platform | All | OS | All | OS Version | |||||
Product Version | CMake 3.3.1 | ||||||||
Target Version | CMake 3.4 | Fixed in Version | CMake 3.4 | ||||||
Summary | 0015774: CTest result submission over http fails to set Content-Type header which runs afoul of ModSecurity rules | ||||||||
Description | On some web hosting providers, ModSecurity rules are in place that prevent using CTest with a CDash installation on that provider. The particular rule looks like this (pieces removed for anonymity): ModSecurity: Access denied with code 406 (phase 2). Match of "rx ^0$" against "REQUEST_HEADERS:Content-Length" required. [msg "Request Containing Content, but Missing Content-Type header"] [uri "/CDash/submit.php"] CTest runs show this error: Submit files (using http) Using HTTP submit method Drop site:http://<mysite>/CDash/submit.php?project=<myproject> [^] Error when uploading file: <mypath>/Testing/20151005-0900/Build.xml Error message was: The requested URL returned error: 406 Not Acceptable Problems when submitting via HTTP The same 406 error is seen using curl -T: # curl -T <mypath>/Testing/20151007-0900/Build.xml http://<mysite>/CDash/submit.php?project=<myproject> [^] <head><title>Not Acceptable!</title></head><body><h1>Not Acceptable!</h1> An appropriate representation of the requested resource could not be found on this server. This error was generated by Mod_Security. </body></html>These hosting providers do not allow any method of disabling particular rules or ModSecurity in general. While we can debate the merits of this rule, it is simple to work around by providing a Content-Type header. E.g., curl -d works: # curl -d @<mypath>/Testing/20151007-0900/Build.xml http://<mysite>/CDash/submit.php?project=<myproject> [^] <cdash version="2.2.2"> <status>OK</status> <message></message> <md5>...</md5> </cdash> | ||||||||
Tags | No tags attached. | ||||||||
Attached Files | |||||||||
Relationships | |
Relationships |
Notes | |
(0039540) Brad King (manager) 2015-10-08 11:00 edited on: 2015-10-12 10:17 |
Fixed using your patch on the dev list: CTest: Set Content-Type header for http file upload https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=2a6e0b61 [^] Thanks! |
(0039572) Brad King (manager) 2015-10-12 10:33 |
I merged this to 'release' to include in 3.4.0-rc2. |
(0040611) Robert Maynard (manager) 2016-03-07 09:12 |
Closing resolved issues that have not been updated in more than 4 months. |
Notes |
Issue History | |||
Date Modified | Username | Field | Change |
2015-10-07 17:49 | Derek Bruening | New Issue | |
2015-10-08 11:00 | Brad King | Note Added: 0039540 | |
2015-10-08 11:00 | Brad King | Assigned To | => Brad King |
2015-10-08 11:00 | Brad King | Status | new => resolved |
2015-10-08 11:00 | Brad King | Resolution | open => fixed |
2015-10-08 11:00 | Brad King | Fixed in Version | => CMake 3.5 |
2015-10-08 11:00 | Brad King | Target Version | => CMake 3.5 |
2015-10-12 10:17 | Brad King | Note Edited: 0039540 | |
2015-10-12 10:33 | Brad King | Note Added: 0039572 | |
2015-10-12 10:33 | Brad King | Fixed in Version | CMake 3.5 => CMake 3.4 |
2015-10-12 10:33 | Brad King | Target Version | CMake 3.5 => CMake 3.4 |
2016-03-07 09:12 | Robert Maynard | Note Added: 0040611 | |
2016-03-07 09:12 | Robert Maynard | Status | resolved => closed |
Issue History |
Copyright © 2000 - 2018 MantisBT Team |