Uses of content-disposition in an HTTP response header

后端 未结 6 453
旧巷少年郎
旧巷少年郎 2020-11-22 11:09

I have found the following asp.net code to be very useful when serving files from a database:

Response.AppendHeader(\"content-disposition\", \"attachment; fi         


        
6条回答
  •  情歌与酒
    2020-11-22 12:06

    Note that RFC 6266 supersedes the RFCs referenced below. Section 7 outlines some of the related security concerns.

    The authority on the content-disposition header is RFC 1806 and RFC 2183. People have also devised content-disposition hacking. It is important to note that the content-disposition header is not part of the HTTP 1.1 standard.

    The HTTP 1.1 Standard (RFC 2616) also mentions the possible security side effects of content disposition:

    15.5 Content-Disposition Issues

    RFC 1806 [35], from which the often implemented Content-Disposition
    (see section 19.5.1) header in HTTP is derived, has a number of very
    serious security considerations. Content-Disposition is not part of
    the HTTP standard, but since it is widely implemented, we are
    documenting its use and risks for implementors. See RFC 2183 [49]
    (which updates RFC 1806) for details.

提交回复
热议问题