简体   繁体   English

Response.Filter多次调用Write()?

[英]Response.Filter making multiple calls to Write()?

For some time I am using custom Response.Filter for rewrite purposes. 有一段时间我使用自定义Response.Filter进行重写。 Since I never tested this module, I decided to run a few tests and spotted something I did not expect. 由于我从未测试过这个模块,所以我决定进行一些测试并发现一些我没想到的东西。

I realized that pages are written to stream using multiple calls to Write(). 我意识到使用多次调用Write()将页面写入流。

So does it mean that my rewrite logic is being called multiple times for the same chunk of html or html is actually divided in partitions? 那么这是否意味着我的重写逻辑被多次调用同一块html或html实际划分为分区?

Please help me understand how Write() works. 请帮助我理解Write()的工作原理。

Pages are written in chunks. 页面以块的形式编写。

Each chunk is sent trhough your filter exactly once. 每个块都会在您的过滤器中发送一次。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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