mono/mono — pull request #232 by justincc (2012-03-01 01:26:36+00:00)
Title: Generate ServerProtocolViolation If WebConnection.GetResponse() returns -1 in ReadDone() 

If WebConnection.GetResponse() returns -1 in ReadDone() then also treat this as a ServerProtocolViolation rather than failing with an exception later on.

We occasionally see this happen in the OpenSimulator project when web requests are made (the project makes a lot of these).
I'm reasoning that a -1 from GetResponse() also indicates that the response is badly formatted (wrong number of parts or not properly terminated) as well as catching an Exception.
Making this change removes the issues that we see.