Re: Writing a file in Response

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



IE has a history of issues with the cache related control headers. To resolve, many HTTP request logics, like AJAX for example, will add a

&unique_name=some_unique_counter

to the request for one reason - to force IE to make the request.

--

nak wrote:
Hi Patrice,

Yes, this is a client side setting for your mime type. So not sure how your application is installed client side but you could enable this during setup...

My last test proved this to not be the case. I made a web service that dishes out a ".torrent" file of the correct MIME type in the same way that I am serving my own file. But it does *not* act in the same way as simply pulling a file from a web page. It offers no functionality of treating the file with any automatic behavior. I think at the moment it is recognising the file via extension, and not by MIME type, I can also back this up by removing MIME information from the registry and it still works.

I think it might have something to do with the Cache Control parameter. I have read that it should be set to "no-transfer" in order to prevent IE from guessing the MIME type of an attachment. Unfortunately .NET doesn't seem to let me change it to this and other settings seem to have no effect.

In the morning I am going to simply compare a working set of headers to the headers that do not work, and that should provide the answer.

I'll update...

Nick.
.



Relevant Pages

  • Re: HTTP - basic authentication example.
    ... or *never* knowing the realm..) ... This is called authentication and is implemented ... requests a web page it sends a request to the server. ... consists of headers with certain information about the request. ...
    (comp.lang.python)
  • Re: Is there a way to obtain a Session object other than the current one ?
    ... > have headers, requests and responses do. ... When I said "same headers of the current page" I should have said "the ... When a request for MyImage.gif is sent to the server, ... I (the client control) want to be like the tag. ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: HttpWebRequest and Host header (ANSWERED)
    ... However there is a subtle difference in the request ... headers sent with this method, and what the actual request should be ... Host: www.company.com ...
    (microsoft.public.dotnet.framework)
  • Re: Multiple sites
    ... >> distinguish them by using host headers. ... When IIS ... browser. ... >> request. ...
    (microsoft.public.inetserver.iis.security)
  • Re: Question regarding mechanize lib
    ... such as the request object. ... but I need to set the headers before the post is called... ... Added protected method Mechanize#set_headers so that subclasses ... Mechanize can now be subclassed to add any headers a user may ...
    (comp.lang.ruby)