Add patch to fix http monitoring
401 and 403 errors were mistakenly hardcoded to return "green" status I'm working with upstream on cleaning up these checks. I expect to see an improvement in 4.3.22.
This commit is contained in:
parent
c2203f8ad1
commit
7cacfc9538
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=397257
2 changed files with 37 additions and 1 deletions
|
@ -2,7 +2,7 @@
|
|||
|
||||
PORTNAME= xymon
|
||||
PORTVERSION= 4.3.21
|
||||
PORTREVISION= 2
|
||||
PORTREVISION= 3
|
||||
CATEGORIES= net-mgmt www
|
||||
MASTER_SITES= SF/xymon/Xymon/${PORTVERSION}
|
||||
PKGNAMESUFFIX= -server${PKGNAMESUFFIX2}
|
||||
|
|
36
net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c
Normal file
36
net-mgmt/xymon-server/files/patch-xymonnet_httpresult.c
Normal file
|
@ -0,0 +1,36 @@
|
|||
Index: xymonnet/httpresult.c
|
||||
===================================================================
|
||||
--- xymonnet/httpresult.c (revision 7670)
|
||||
+++ xymonnet/httpresult.c (working copy)
|
||||
@@ -36,13 +36,26 @@
|
||||
result = (h->dialup ? COL_CLEAR : COL_RED);
|
||||
break;
|
||||
case 100: /* Continue - should be ok */
|
||||
- case 200: case 201: case 202: case 203: case 204: case 205: case 206:
|
||||
- case 301: case 302: case 303: case 307:
|
||||
- case 401: case 403: /* Is "Forbidden" an OK status ? */
|
||||
+ case 200:
|
||||
+ case 201:
|
||||
+ case 202:
|
||||
+ case 203:
|
||||
+ case 204:
|
||||
+ case 205:
|
||||
+ case 206:
|
||||
+ case 301:
|
||||
+ case 302:
|
||||
+ case 303:
|
||||
+ case 307:
|
||||
result = COL_GREEN;
|
||||
break;
|
||||
- case 400: case 404: case 405: case 406:
|
||||
- result = COL_RED; /* Trouble getting page */
|
||||
+ case 400:
|
||||
+ case 401:
|
||||
+ case 403: /* Trouble getting page */
|
||||
+ case 404:
|
||||
+ case 405:
|
||||
+ case 406:
|
||||
+ result = COL_RED;
|
||||
break;
|
||||
case 500:
|
||||
case 501:
|
Loading…
Reference in a new issue