Looking at the AttachFileHandler.ashx HTTP response headers, the βproblemβ is that the content is returned as a file:
HTTP/1.1 200 OK Cache-Control: private Content-Length: 11688 Content-Type: application/octet-stream Server: Microsoft-IIS/7.0 X-AspNet-Version: 4.0.30319 content-disposition: filename=Screenshot.png X-Powered-By: ASP.NET Date: Fri, 17 Aug 2012 08:51:44 GMT
This is the content-disposition header that forces the Save As dialog, although the browser can simply display the image directly. See Note to 19.5.1 Content-Disposition from w3.org:
If this header is used in the response with the content type of the application / octet stream, the implied assumption is that the user agent should not display the response, but directly enters the "save response as ..." dialog.
I suspect that TFS does this so that it can return any file, regardless of whether the receiving browser can process the content initially, for example, using a plug-in for PDF files. Perhaps it would be possible to modify AttachFileHandler.ashx to change the way it returns?
staticboy
source share