Fix CSV output in avail.c

Andreas Ericsson ae at op5.se
Tue Jan 10 10:08:00 CET 2012


On 01/09/2012 05:20 PM, Jochen Bern wrote:
> On 01/09/2012 04:38 PM, Andreas Ericsson wrote:
>> On 11/28/2011 09:04 PM, Sven-Göran Bergh wrote:
>>> 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?
> 
> Just to list two facts:
> 
> 1. At least Firefox does a *RE*load of the URL when you save the page:
> 
>> # grep readme /var/log/httpd/ssl_access_log
>> 192.168.51.57 - bern [09/Jan/2012:16:57:44 +0100] "GET /nagios/readme.txt HTTP/1.1" 200 772
>> 192.168.51.57 - bern [09/Jan/2012:16:57:54 +0100] "GET /nagios/readme.txt HTTP/1.1" 200 772
> 
> 2. There's no guarantee that the saved version is *identical* to the
> actual server-provided one (though I admit that so far, I've seen only
> *HTML* getting majorily reformatted).
> 
>> I know there are parsers out there that handle the Nagios-style CSV format
> 
> All the more reason to get the browser's rendering engine (?) out of the
> data flow *before* there's funky text/plain browser-X-only
> prettyprinting ...
> 

Those tools would get the data directly from Nagios though, and ignore the
headers completely. This was for the LF -> CRLF conversion, btw. Content
type can be completely ignored for tools that fetches the content as a
bytestream.

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
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.

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create 
new or port existing apps to sell to consumers worldwide. Explore the 
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev




More information about the Developers mailing list