jgauffin / griffin.networking

Networking library for .NET
http://blog.gauffin.org/2012/05/griffin-networking-a-somewhat-performant-networking-library-for-net/
GNU Lesser General Public License v3.0
108 stars 35 forks source link

Null reference.... #4

Closed dazoe closed 11 years ago

dazoe commented 11 years ago

I tried out your library to use the http server... and noticed it fails on http 1.0 requests.

jgauffin commented 11 years ago

Can you provide a failing request?

dazoe commented 11 years ago

GET / HTTP/1.0 Host: blue:8888 Connection: Keep-Alive User-Agent: Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.97 Safari/537.11 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,/;q=0.8 Accept-Language: en-US,en;q=0.8 Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

jgauffin commented 11 years ago

the parser itself works. Just added a unit test with that request.

Can you include the exception details?

dazoe commented 11 years ago

Sorry, for the long delay. I believe the problem is with Ad Muncher. When I disable Ad Muncher the problem goes away. If i have some time this afternoon I'll recreate the bug and get the exception details.

jgauffin commented 11 years ago

Did you have a chance to reproduce it?

dazoe commented 11 years ago

For some reason my debugger is not catching the exception. But there is a null reference at line 223 in ServerClientContext.cs

                bool isPending = _socket.ReceiveAsync(_readArgs);

_socket is null. I think what is happening here is AdMuncher is closing the connection immediately after the content is received.

jgauffin commented 11 years ago

Fixed in the next commit.