b2科目四模拟试题多少题驾考考爆了怎么补救
b2科目四模拟试题多少题 驾考考爆了怎么补救

黑莓9550_黑莓9530_黑莓9550好难用(9)

电脑杂谈  发布时间:2016-11-25 21:04:31  来源:网络整理

在streamFile(file,response)方法中加入对CODMIME类型的处理,告诉客户端浏览器将要发送cod文件以及对应MIME类型。

  1. i f ( f ile .g et P at h() .e nd sWit h( J AD_ E XT ) ) re spo nse .s et Co nte nt T y pe ( J AD_M I M E ) ;  
  2.  
  3. i f ( f ile .g et P at h() .e nd sWit h( J AR_ E XT ) ) re spo nse .se t Co nte nt T y pe ( J AR_M IME ) ;  
  4.  
  5. i f ( f ile. g et Pa t h ().endsWith( COD_ EXT )) response. s etContent T yp e ( COD_MIME );  

在doGet()方法的最前面通知手机浏览器和代理服务器(比如BlackBerryMDS)对此URL不要做任何cache处理。

  1. re spo nse .se t He ader( "C ac he -C o ntrol ", "no - st ore "); //H T T P 1.1  
  2.  
  3. re spo nse .se t He ader( "P r agm a" ,"no -c ac he "); //HT T P 1. 0  
  4.  
  5. re spo nse .se t Date He ade r ( "E xpire s", 0); //preve nt s c ac hi ng a t t he p ro xy s erve r  


本文来自电脑杂谈,转载请注明本文网址:
http://www.pc-fly.com/a/shouji/article-21862-9.html

相关阅读
    发表评论  请自觉遵守互联网相关的政策法规,严禁发布、暴力、反动的言论

    热点图片
    拼命载入中...