jgauffin / Griffin.Framework

Application framework for Business Applications
http://griffinframework.net
168 stars 62 forks source link

IndexOutOfRanceException in Http Header Parser #53

Closed PhonicUK closed 8 years ago

PhonicUK commented 8 years ago

Reported by end user, cause as yet unknown. Stack trace follows:

System.IndexOutOfRangeException: Index was outside the bounds of the array.
      at Griffin.Net.Protocols.Http.Messages.HeaderParser.FirstLine (Char ch) <0x40d895e0 +="" 0x000da=""> in <filename unknown="">:0
      at Griffin.Net.Protocols.Http.Messages.HeaderParser.Parse (ISocketBuffer buffer, Int32 offset) <0x40d893c0 +="" 0x0003d=""> in <filename unknown="">:0
      at Griffin.Net.Protocols.Http.HttpMessageDecoder.ProcessReadBytes (ISocketBuffer buffer) <0x40d89120 +="" 0x0007f=""> in <filename unknown="">:0
      at Griffin.Net.Channels.TcpChannel.OnReadCompleted (System.Object sender, System.Net.Sockets.SocketAsyncEventArgs e) <0x40d88ec0 +="" 0x00166=""> in <filename unknown="">:0
jgauffin commented 8 years ago

Will be caused if the first line is not a valid request/response string. Correected (now throws BadRequestException)