[ nagiosplug-Bugs-3571331 ] check_http converts semicolon to newline in -k

SourceForge.net <[email protected]>
Newsgroups gmane.network.nagios.plugins.devel
Message-ID <[email protected]>
Bugs item #3571331, was opened at 2012-09-24 14:14
Message generated for change (Comment added) made by rpsmart
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3571331&group_id=29880

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: Argument proccessing
Group: release-1.4.15
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: RudolfPotucekSmart (rpsmart)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_http converts semicolon to newline in -k 

Initial Comment:
When trying to pass Accept: headers, which are supposed to contain semicolons, using the -k option then the semicolon is converted to a newline (verified using snapshot version 1.4.16-38-g4cdd on RHEL 6.3 and recording request using tcpdump:

call:

./nagios-plugins-1.4.16-38-g4cdd/plugins/check_http -I obfuscated -H obfuscated -k 'Accept: application/json;charset=UTF-8' -u obfuscated

tcpdump / wireshark:

GET ofuscated HTTP/1.1
User-Agent: check_http/v1.4.16-38-g4cdd (nagios-plugins 1.4.16)
Connection: close
Host: obfuscated
Accept: application/json
charset=UTF-8

----------------------------------------------------------------------

Comment By: RudolfPotucekSmart (rpsmart)
Date: 2013-05-29 09:36

Message:
I think multiple -k options don't help because there is only ONE header
called "Accept:" with a value of "application/json;charset=UTF-8"

----------------------------------------------------------------------

Comment By: Richard Leitner (g0hl1n)
Date: 2013-05-29 06:06

Message:
Hi,
btw: I've opened a pull request for the removal of the semicolon input
delimiter from the -k argument.

br,
Richard

----------------------------------------------------------------------

Comment By: Richard Leitner (g0hl1n)
Date: 2013-05-29 05:32

Message:
Hi,
as far as I see in the check_http source the semicolon is used as delimiter
for multiple header fields.
So as the semicolon is a valid character in header fields this should be
changed.

Due to the fact multiple -k arguments could be passed I think such a
delimiter isn't needed at all.
Is there an other reason for this delimiter?

br,
Richard

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397597&aid=3571331&group_id=29880

------------------------------------------------------------------------------
Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET
Get 100% visibility into your production application - at no cost.
Code-level diagnostics for performance bottlenecks with <2% overhead
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap1
_______________________________________________________
Nagios Plugin Development Mailing List Nagiosplug-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Unsubscribe at https://lists.sourceforge.net/lists/listinfo/nagiosplug-devel
::: Please include plugins version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.