Re: [Nagios-devel] Fix CSV output in avail.c
Posted: Mon Jan 09, 2012 3:39 pm
On 11/28/2011 09:04 PM, Sven-Göran Bergh wrote:
> Hi,
>
> attached patch fix the CSV output from avail.c
> to comply better with RFC-4180, see
>
> http://www.ietf.org/rfc/rfc4180.txt.
>
> Content-type now is Text/csv, so the browser
> presents a view/save dialog.
How is this an improvement over just hitting Ctrl+S once the page
has loaded? Personally, I detest when pages I *know* is plain text
forces me to click something just in order to either view or save,
when saving after it's viewed is so simple anyway.
> Likewise, CRLF is used.
>
This could be tricky. I know there are parsers out there that handle
the Nagios-style CSV format, and if they break because we suddenly
choose to go strict with the style we use, we shove a broomstick up
our asses for no gain what so ever.
So... Have you verified that this patch doesn't break anything, or
is that supposed to be an exercise for one of the maintainers? If
you haven't done it, it's unlikely to get done at all, and in that
case the CRLF part of the patch will almost certainly have to be
dropped or modified so that line-endings are given as a character
sequence by the user instead.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
> Hi,
>
> attached patch fix the CSV output from avail.c
> to comply better with RFC-4180, see
>
> http://www.ietf.org/rfc/rfc4180.txt.
>
> Content-type now is Text/csv, so the browser
> presents a view/save dialog.
How is this an improvement over just hitting Ctrl+S once the page
has loaded? Personally, I detest when pages I *know* is plain text
forces me to click something just in order to either view or save,
when saving after it's viewed is so simple anyway.
> Likewise, CRLF is used.
>
This could be tricky. I know there are parsers out there that handle
the Nagios-style CSV format, and if they break because we suddenly
choose to go strict with the style we use, we shove a broomstick up
our asses for no gain what so ever.
So... Have you verified that this patch doesn't break anything, or
is that supposed to be an exercise for one of the maintainers? If
you haven't done it, it's unlikely to get done at all, and in that
case the CRLF part of the patch will almost certainly have to be
dropped or modified so that line-endings are given as a character
sequence by the user instead.
--
Andreas Ericsson [email protected]
OP5 AB www.op5.se
Tel: +46 8-230225 Fax: +46 8-230231
Considering the successes of the wars on alcohol, poverty, drugs and
terror, I think we should give some serious thought to declaring war
on peace.
This post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]