Xymon Mailing List Archive search

Patch: report.sh and snapshot.sh fix for Firefox

list Roland Rosenfeld
Fri, 9 Feb 2024 17:57:50 +0100
Message-Id: <user-9fa19b9d5215@xymon.invalid>

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
Attachments (1)