简体   繁体   中英

How to detect file download request

I have a situation where I need to block all file download request/response from web on the system which is running Titanium-Web-Proxy. How can I identify all those requests/responses to block them.

You cannot able to find very simple.

Because every website using their own way of techniques. You need to do for individual website.

Check the Request.Method = "POST"

As far we detected few websites

Samples below :

// Dropbox uses chunks of octet-stream requests:

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

// Yahoo uses savewithattachment method

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

// Office365 Uses

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM