• The restricted headers are:


    有些时候我们可以向httpContent里自己添加一些数据,例如下载的时候,可以自己定义类型,然后处理数据,。

        context.Response.AddHeader("Content-Length",((long)(m_totalLength-m_readLendth)).ToString());
        context.Response.ContentType = "application/octet-stream";
        context.Response.AddHeader("Content-Disposition", "attachment; filename="+m_file.FileName);

    其中我们可以自己添加的类型有:

  • Accept
  • Connection
  • Content-Length
  • Content-Type
  • Date
  • Expect
  • Host
  • If-Modified-Since
  • Range
  • Referer
  • Transfer-Encoding
  • User-Agent

    而我在实际应用的时候没成功。

================================
  /\_/\                        
 (=^o^=)  Wu.Country@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================
  • 相关阅读:
    织梦DEDEcms首页调用文档整篇内容
    dedecms专题列表页不显示标题的解决办法
    怎么让织梦文章按照权重排序
    Codeforces274B
    HDU5693
    HDU2476
    POJ3613
    「LibreOJ NOIP Round #1」旅游路线
    Educational Codeforces Round 48
    组合博弈学习笔记
  • 原文地址:https://www.cnblogs.com/WuCountry/p/305621.html
  • Copyright © 2020-2023  润新知