ServiceStack/ServiceStack — pull request #864 by Its-Tyson (2013-11-30 04:37:38+00:00)
Title: Repro test for long timeouts when partial writing streams past the content length

As discussed here: https://github.com/ServiceStack/ServiceStack/pull/863

> Just a heads up this actually resulted in a pretty nasty bug - any FB hits would get stuck waiting for the input stream to 'catch up' to the requested range, which would obv never occur and the request would eventually timeout. But during heavy FB traffic enough requests came in to starve the IIS thread pool.

> You may want to look into the WritePartialTo method to throw in cases where the requested end is larger than the fromStream length. I didnt want to do this incase it is suppose to handle cases where the fromStream is actually also being streamed to disk, in which case I think the only solution is to use async stream reading and implement shorter/configurable timeouts?