Re: opening a client application from a server?



ccc31807 <cartercc@xxxxxxxxx> wrote:
jue, thanks for your comments.

On May 7, 8:46 pm, Jürgen Exner <jurge...@xxxxxxxxxxx> wrote:
No, it's not an Apache problem, either. It's an HTTP problem.

This is what I can't understand. I import a big glob of data from a
database into my script, generate many csv files, or txt files, or pdf
files, or xml file, etc., and generate links. The browsers, IE but FF
as well will happily open a csv file in Excel (assuming that the
client is a Windows machine with Office installed), open a pdf file in
Acrobat, open a txt file in the browser window, and so on.

Which IMNSHO is a major mistake of the browser. The browser should never
assume a file type based on the last 3 characters of a file name.

I ASSUMED(!) that a doc file would work the same way, that is, open
natively in Word on a machine running Office. It doesn't, and I don't
know enough to understand why it doesn't.

Has nothing to do with Windows but everything with how HTTP works.
So, what Content-Type did you try?

I didn't. When I produce csv, pdf, etc., I don't specify any Content-
Type. I just create the files and they open the way they should. XML
is very picky, and Word demands a PERFECT(!) XML file to open,
otherwise it throws an error, and I suspect that an attempt to
incorporate a Content-Type element in the XML would create a problem.

You don't incorporate it into the XML, you set the Content-Type in the
HTTP response header just as Tad explained already.
And no, it really has nothing to do with Perl.

Besides, I don't understand why a Content-Type is necessary.

Because it tells the browser what to do with that particular HTTP
response.

jue
.



Relevant Pages

  • Re: Using Word Mail Merge feature for custom templates
    ... > You are suggesting that I store the content in XML at server end and when I ... A browser knows to open a ... WordProcessingML file in Word due to the PI Word writes into it. ...
    (microsoft.public.word.mailmerge.fields)
  • Re: HttpRequest Question
    ... browser (that is the result of the XSL transformation) and what you really ... have (that is the original XML file). ... What do you want to do on this XML file? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Open File
    ... > targeted asp script need only send the data read from the requested file> back to ... >> need client-side code and reduced security levels on the browser? ... > You'll need a lot more than "reduced security" to open a file directly> with the ... You can then use the FileSystemObject to open and read text files or the ms xml components to read local XML files. ...
    (microsoft.public.scripting.vbscript)
  • Re: What is the logic of storing XML in a Database?
    ... presents the above as an absolute advantage of XML. ... including COBOL copy books, regular expressions, BNF grammars, SQL ... Schemas, AWK, perl etc. ... I have seen no shortage of CSV files with multiple record types. ...
    (comp.databases.theory)
  • Re: Attempt to de-mystify AJAX
    ... you could declare all your variables as Variant. ... the browser, and I still think of that as a mixed blessing. ... XML, which is far from being the most efficient data representation ... done as a fat client, ...
    (comp.databases.pick)