【问题标题】:How to detect file download request如何检测文件下载请求
【发布时间】:2017-11-06 11:21:44
【问题描述】:

我有一种情况,我需要在运行 Titanium-Web-Proxy 的系统上阻止来自 Web 的所有文件下载请求/响应。 我如何识别所有这些请求/响应来阻止它们。

【问题讨论】:

    标签: c# .net proxy titanium-web-proxy


    【解决方案1】:

    你找不到很简单的。

    因为每个网站都使用自己的技术方式。您需要针对个别网站进行操作。

    检查 Request.Method = "POST"

    目前我们检测到的网站很少

    以下示例:

    // Dropbox 使用字节流请求块:

      if (url.Contains("/chunked_upload?") && url.Contains("chunk=0"))
      {
           //File Upload through this URL       
      }
    

    // Yahoo 使用 savewithattachment 方法

     if (url.ToLower().Contains("savewithattachment"))
     {
     //File Upload through this URL  
     }
    

    // Office365 用途

     if (url.ToLower().Contains("createattachment"))
     {
     //File Upload through this URL  
     }
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-08-20
      • 1970-01-01
      • 2014-07-05
      • 1970-01-01
      • 2019-06-21
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多