Ema has submitted this change and it was merged. (
https://gerrit.wikimedia.org/r/404279 )
Change subject: varnishslowlog: do not crash on empty reqheader values
......................................................................
varnishslowlog: do not crash on empty reqheader values
ReqHeader can occasionaly have no associated value. Avoid crashing and
set value to empty string if that is the case.
Change-Id: Iae09345373ff7ad6119c9c87fe7cc4a95e2896db
---
M modules/varnish/files/varnishslowlog.py
1 file changed, 8 insertions(+), 1 deletion(-)
Approvals:
Ema: Looks good to me, approved
jenkins-bot: Verified
diff --git a/modules/varnish/files/varnishslowlog.py
b/modules/varnish/files/varnishslowlog.py
index 349e347..4e5ad1d 100644
--- a/modules/varnish/files/varnishslowlog.py
+++ b/modules/varnish/files/varnishslowlog.py
@@ -139,7 +139,14 @@
elif tag == 'ReqHeader':
splitagain = value.split(None, 1)
header_name = splitagain[0][:-1]
- header_value = splitagain[1]
+
+ if len(splitagain) == 2:
+ header_value = splitagain[1]
+ else:
+ # ReqHeader can occasionaly have no associated value. Set value
+ # to empty string if that is the case.
+ header_value = ''
+
self.tx['request-' + header_name] = header_value
elif tag == 'RespHeader':
splitagain = value.split(None, 1)
--
To view, visit https://gerrit.wikimedia.org/r/404279
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Iae09345373ff7ad6119c9c87fe7cc4a95e2896db
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ema <[email protected]>
Gerrit-Reviewer: Ema <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits