Glimpse/Glimpse — pull request #555 by CGijbels (2013-10-08 22:50:12+00:00)
Title: Fixed PreBodyTagFilter partial writes handling

The `PreBodyTagFilter` filter we assign to the `Response.Filter` property when Glimpse `

` tag could not be found in the first chunks, even though the script injection succeeded because it eventually found a `

` tag in the last chunk. This is now fixed and the warning will only be written when there is effectively no `

` tag found
- If you were very unlucky and the chunks actually split up your `

` tag (chunk1 ends with `` then Glimpse script tags would not be injected even though the received HTML markup contains a `

` tag. This is now fixed as well

You could simulate the old situation by simply creating the following controller action, you'll see that Glimpse scripts are not being injected, even though there is a `

` tag.

```
public ActionResult TestFilterIssue()
{
return new ContentResult
{
Content = "

" + new string('X', 16352) + "

"
};
}
```