× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.




Hi Henrik,

<snip>
yes I have had the same problem, e.g. when creating CSV files on the fly and needs

Content-type: application/vnd.ms-excel
Content-disposition: attachment; filename=PXWATBL.csv
</snip>

For application/xml I currently inspect the Content-Type header and translate to the charset indicated on the header (or to the value held in CGI_ASCII_CCSID if no charset).

I understand the server not translating application type content, but it can be an issue when some of the content really is text and really does need translation.

Examples include:
application/xml
application/vnd.ms-excel (for CSV or XML Spreadsheets)
application/xhtml+xml

The server is correctly assuming an excel spreadsheet (binary) is being sent to the client when application/vnd.ms-excel is set. If the content is really a csv file (text) then translation is required on the server.

Without the file name (and therefore extension) provided in the Content-Disposition header, together with a list of exceptions, I'd imagine it would be difficult to determine which is which.

For application/xml I think this issue is more difficult. I am sending a XML doc and declaring its content type accordingly. The server determines this is NOT text data based on the application content type. Other than placing code in the CGI program or changing the content type to text/xml there doesn't seem to be a way around it.

Cheers

Larry Ducie



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.