[Nagiosplug-devel] [ nagiosplug-Feature Requests-1652471 ] check_http is missing http Accept: header
SourceForge.net
noreply at sourceforge.net
Thu May 10 18:59:12 CEST 2007
Feature Requests item #1652471, was opened at 2007-02-05 15:59
Message generated for change (Comment added) made by psychotrahe
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1652471&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: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: Andreas Vavra (vavra)
Assigned to: Nobody/Anonymous (nobody)
Summary: check_http is missing http Accept: header
Initial Comment:
check_http is not sending an "Accept:" header when connecting to http servers.
Please add something like
/* Accept Header */
asprintf (&buf, "%sAccept: text/html\r\n",buf);
in function check_http() in check_http.c somewhere after
/* optionally send the host header info */
if (host_name)
asprintf (&buf, "%sHost: %s\r\n", buf, host_name);
If you can spend some more time on this plugin, optionally add a command line parameter to let caller set/override this option (i.e. for changing "Accept:" from "text/html" to "text/xml").
Regards
Andi
----------------------------------------------------------------------
>Comment By: Matthias Eble (psychotrahe)
Date: 2007-05-10 18:59
Message:
Logged In: YES
user_id=1694341
Originator: NO
Hi Andreas,
I'm going to redirect this one to the feature request tracker since
Accept isn't a mandatory field in http.
You could add the Accept header by using -k. from --help:
-k, --header=STRING
Any other tags to be sent in http header. Use multiple times for
additional headers
I havent tried it yet, but it should work.
However, to a test if the received document matches a specified mime type
could make sense to me.
Matthias
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=397600&aid=1652471&group_id=29880
More information about the Devel
mailing list