Is there a reason why the httpstatus test is case sensitive?
list John Thurston
Yesterday, I crashed xymonnet by doing a copy/paste into an httpstatus test. I eventually figured out what was wrong. This syntax is good: 0.0.0.0 foo.com # httpstatus;http://foo.com/index.html;401 This syntax is bad: 0.0.0.0 foo.com # httpstatus;HTTP://foo.com/index.html;401 The man page for hosts.cfg doesn't say anything about required or supported casing. Is there some reason why xymonnet shouldn't be able to handle mixed-case protocol names in the URLs provided? -- Do things because you should, not just because you can. John Thurston XXX-XXX-XXXX user-ce4d79d99bab@xymon.invalid Enterprise Technology Services Department of Administration State of Alaska
list Japheth Cleaver
▸
On Wed, April 1, 2015 10:07 am, John Thurston wrote:
Yesterday, I crashed xymonnet by doing a copy/paste into an httpstatus test. I eventually figured out what was wrong. This syntax is good: 0.0.0.0 foo.com # httpstatus;http://foo.com/index.html;401 This syntax is bad: 0.0.0.0 foo.com # httpstatus;HTTP://foo.com/index.html;401 The man page for hosts.cfg doesn't say anything about required or supported casing. Is there some reason why xymonnet shouldn't be able to handle mixed-case protocol names in the URLs provided?
John, Can't think of any... Case preservation should be done for the path, but the protocol is irrelevant there. https://www.ietf.org/rfc/rfc1738.txt calls it out as a 'should', so it seems like a bug (I believe parse_url() in lib/url.c). I'll roll this in. Curious, did you get any sort of error log output before it went down? Aside from case-insensitive matching, it's an indication we're not doing sufficient error checking later on somewhere. -jc
list John Thurston
▸
On 4/1/2015 9:47 AM, J.C. Cleaver wrote:
On Wed, April 1, 2015 10:07 am, John Thurston wrote:Yesterday, I crashed xymonnet by doing a copy/paste into an httpstatus test. I eventually figured out what was wrong. This syntax is good: 0.0.0.0 foo.com # httpstatus;http://foo.com/index.html;401 This syntax is bad: 0.0.0.0 foo.com # httpstatus;HTTP://foo.com/index.html;401 The man page for hosts.cfg doesn't say anything about required or supported casing. Is there some reason why xymonnet shouldn't be able to handle mixed-case protocol names in the URLs provided?John, Can't think of any... Case preservation should be done for the path, but the protocol is irrelevant there. https://www.ietf.org/rfc/rfc1738.txt calls it out as a 'should', so it seems like a bug (I believe parse_url() in lib/url.c). I'll roll this in. Curious, did you get any sort of error log output before it went down? Aside from case-insensitive matching, it's an indication we're not doing sufficient error checking later on somewhere.
Yes. I received: 2015-03-31 14:39:34 Unknown URL scheme 'HTTP' in URL 'HTTP://foo.com:9080' which looks like it comes from lib/url.c following a case-sensitive match of startp against a list of possible types. Thanks for your quick attention.
▸
--
Do things because you should, not just because you can.
John Thurston XXX-XXX-XXXX
user-ce4d79d99bab@xymon.invalid
Enterprise Technology Services
Department of Administration
State of Alaska
list Steve Coile
"URLs in general are case-sensitive (with the exception of machine names). There may be URLs, or parts of URLs, where case doesn't matter, but identifying these may not be easy. Users should always consider that URLs are case-sensitive." http://www.w3.org/TR/WD-html40-970708/htmlweb.html -- *Steve Coile*Senior Network and Systems Engineer, McClatchy Interactive <http://www.mcclatchyinteractive.com/>; Office: XXX-XXX-XXXX | Mobile: XXX-XXX-XXXX | Fax: XXX-XXX-XXXX On Wed, Apr 1, 2015 at 1:58 PM, John Thurston <user-ce4d79d99bab@xymon.invalid>
▸
wrote:
On 4/1/2015 9:47 AM, J.C. Cleaver wrote:On Wed, April 1, 2015 10:07 am, John Thurston wrote:Yesterday, I crashed xymonnet by doing a copy/paste into an httpstatus test. I eventually figured out what was wrong. This syntax is good: 0.0.0.0 foo.com # httpstatus;http://foo.com/index.html;401 This syntax is bad: 0.0.0.0 foo.com # httpstatus;HTTP://foo.com/index.html;401 The man page for hosts.cfg doesn't say anything about required or supported casing. Is there some reason why xymonnet shouldn't be able to handle mixed-case protocol names in the URLs provided?John, Can't think of any... Case preservation should be done for the path, but the protocol is irrelevant there. https://www.ietf.org/rfc/rfc1738.txt calls it out as a 'should', so it seems like a bug (I believe parse_url() in lib/url.c). I'll roll this in. Curious, did you get any sort of error log output before it went down? Aside from case-insensitive matching, it's an indication we're not doing sufficient error checking later on somewhere.Yes. I received: 2015-03-31 14:39:34 Unknown URL scheme 'HTTP' in URL 'HTTP://foo.com:9080 ' which looks like it comes from lib/url.c following a case-sensitive match of startp against a list of possible types. Thanks for your quick attention. -- Do things because you should, not just because you can. John Thurston XXX-XXX-XXXX user-ce4d79d99bab@xymon.invalid Enterprise Technology Services Department of Administration State of Alaska
list Japheth Cleaver
▸
On Wed, April 1, 2015 10:58 am, John Thurston wrote:
On 4/1/2015 9:47 AM, J.C. Cleaver wrote:On Wed, April 1, 2015 10:07 am, John Thurston wrote:Yesterday, I crashed xymonnet by doing a copy/paste into an httpstatus test. I eventually figured out what was wrong. This syntax is good: 0.0.0.0 foo.com # httpstatus;http://foo.com/index.html;401 This syntax is bad: 0.0.0.0 foo.com # httpstatus;HTTP://foo.com/index.html;401 The man page for hosts.cfg doesn't say anything about required or supported casing. Is there some reason why xymonnet shouldn't be able to handle mixed-case protocol names in the URLs provided?John, Can't think of any... Case preservation should be done for the path, but the protocol is irrelevant there. https://www.ietf.org/rfc/rfc1738.txt calls it out as a 'should', so it seems like a bug (I believe parse_url() in lib/url.c). I'll roll this in. Curious, did you get any sort of error log output before it went down? Aside from case-insensitive matching, it's an indication we're not doing sufficient error checking later on somewhere.Yes. I received: 2015-03-31 14:39:34 Unknown URL scheme 'HTTP' in URL 'HTTP://foo.com:9080' which looks like it comes from lib/url.c following a case-sensitive match of startp against a list of possible types. Thanks for your quick attention.
This is fixed in 4.3.20.
Regards,
-jc