zoukankan      html  css  js  c++  java
  • 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@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================
查看全文
  • 相关阅读:
    程序员是怎么炼成的---OC题集--练习答案与题目(3)
    程序员是怎么炼成的---OC题集--练习答案与题目(2)
    152. Maximum Product Subarray
    151. Reverse Words in a String
    150. Evaluate Reverse Polish Notation
    148. Sort List
    147. Insertion Sort List
    145. Binary Tree Postorder Traversal
    144. Binary Tree Preorder Traversal
    140. Word Break II
  • 原文地址:https://www.cnblogs.com/WuCountry/p/305621.html
  • Copyright © 2011-2022 走看看