[Xymon] Patch: report.sh and snapshot.sh fix for Firefox

Roland Rosenfeld roland at spinnaker.de
Fri Feb 9 17:57:50 CET 2024


Hi!

I noticed, that in Xymon 4.3.30 opening the "Snapshot Report"
(snapshot.sh) as well as the "Availability Report" (report.sh) in the
"Reports" menu do not work as expected, but try to download a file
snapshot.sh or report.sh.

Digging deeper into this, I noticed, that this seems a Firefox only
problem, while chromium works without problems.

In the code web/snapshot.c and web/report.c I found a variable
usemultipart, which is 1 by default and is reset to 0 if
HTTP_USER_AGENT contains "KHTML", which (according to a comment) cannot
handle multipart documents.

It seems, that current Firefox also can not handle this correct, while
Chromium uses the User-Agent
"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/90.0.4430.212 Safari/537.36"
so it already disables multipart.

From my point of view, it may be a good idea to disable usemultipart
by default, if Safari, Konqueror and Chrom(ium) disable it via the
KHTML in the User-Agent and Firefox doesn't work with usemultipart=0.

The attached patch against 4.3.30 is attached, which solves the
problems for me using Firefox, it should also work with 4.4.

Greetings
Roland
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 94_nousemultipart.patch
Type: text/x-diff
Size: 763 bytes
Desc: not available
URL: <http://lists.xymon.com/pipermail/xymon/attachments/20240209/2b92f657/attachment.patch>


More information about the Xymon mailing list