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@侠缘      
 (~)@(~)  一辈子,用心做一件事!
--------------------------------
  学而不思则罔,思而不学则怠!  
================================
查看全文
  • 相关阅读:
    Lua 有关字符串的剪切 以及匹配
    [Decode error
    mac 终端 常用命令
    mac apache 相关终端命令
    spring boot架构设计——权限验证及API接口统一返回格式
    ios 官网文档翻译—Create a Table View(swift)
    quicksqlite简介
    android ndk 环境搭建和简单实例
    android 关闭软键盘
    android 弹出全局加载等待动画
  • 原文地址:https://www.cnblogs.com/WuCountry/p/305621.html
  • Copyright © 2011-2022 走看看