none
Problem saving a file with the "Content-Disposition" HTTP Response header field. RRS feed

  • Question

  • First, some background information on the environment.  We have an industrial device that has a mini-webserver installed.  This device saves parameter information in a JSON file.  It uses this file like a multi-level INI file.  Using Internet Explorer 8, I am requesting the following URL:

    http://atb.qpm/system/spindle1/controller/data/params.json?download=jobs.json&sections=jobs,psets

    This URL is really a CGI-type request. The left part is the file name to look at, "/spindle1/controller/data/params.json".  This argument means returns the two sections "jobs" and "psets" as if it were an independent file, "sections=jobs,psets".  The remaining part, "download=jobs.json", means add a Content-Disposition field to the response with this file name.  The webserver responds with the following content:

    HTTP/1.1 200 OK
    Content-type:text/plain
    Cache-Control:no-cache
    Content-Disposition: attachment; filename=jobs.json

    (content data)

    Firefox and Chrome do as I would expect, it puts up a file save prompt with the suggested name and lets me save the file.  IE8 asks to either open or save the file.  If I select "Open", the file is properly displayed.  If I select "Save", a pop-up appears with the flying paper sheets with:

    Getting file information:
    params.json from atb.qpm

    Another pop-up is displayed on top of it with:

    Internet Explorer can not download params.json from atb.qpm
    Internet explorer was not able to open this Internet site.  The requested site is either unavailable or cannot be found.  Please try again later.

    I am monitoring the HTTP traffic with Wireshark and don't see anything wrong with the content going either way.  I've also tried modifying the response header, like returning "application/octet-stream" and "Content-length" fields, but without success.

    Is there any way to get this to work correctly?

    • Changed type murrellr Tuesday, May 1, 2012 12:14 PM Its really a long question
    Monday, April 30, 2012 8:26 PM

Answers

  • Hi,

    According to your description, I suggest to contact IE development Forum for further help:

    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thank you for your understanding.

    Regards,

    Leo   Huang


    Leo Huang

    TechNet Community Support

    Wednesday, May 2, 2012 4:27 AM
    Moderator

All replies

  • I should also add that the Ethernet connection is point-to-point.  The device has mini dhcp and dns servers.  When it receives a DHCP request, the PC is given a unique IP address on a private network, and a DNS request for "atb.qpm" responds with the device's IP address.  It remains quiet for all other DNS requests.


    The future isn't what is used to be.

    Monday, April 30, 2012 8:38 PM
  • Hi,

    According to your description, I suggest to contact IE development Forum for further help:

    http://social.msdn.microsoft.com/Forums/en-US/iewebdevelopment/threads

    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. 

    Thank you for your understanding.

    Regards,

    Leo   Huang


    Leo Huang

    TechNet Community Support

    Wednesday, May 2, 2012 4:27 AM
    Moderator