0
Vote

ObexWebRequest doesn't support long responses (of 0x8000 bytes and over)

description

Seen by inspection...
Added test:
[[
InTheHand.Net.Tests.ObexRequest.NewWholeProcessTests.SimplePut1_ResponsesHave16bitLengths : System.Net.WebException : Connect failed.
  ----> System.OverflowException : Arithmetic operation resulted in an overflow.
   at InTheHand.Net.ObexWebRequest.GetResponse() in D:\Documents and Settings\alan\My Documents\Visual Studio 2005\Projects\32feet Merge\InTheHand.Net.Personal\InTheHand.Net.Personal\Net\ObexWebRequest.cs:line 922
--OverflowException
   at InTheHand.Net.ObexWebRequest.Connect_Obex() in D:\Documents and Settings\alan\My Documents\Visual Studio 2005\Projects\32feet Merge\InTheHand.Net.Personal\InTheHand.Net.Personal\Net\ObexWebRequest.cs:line 480
   at InTheHand.Net.ObexWebRequest.Connect() in D:\Documents and Settings\alan\My Documents\Visual Studio 2005\Projects\32feet Merge\InTheHand.Net.Personal\InTheHand.Net.Personal\Net\ObexWebRequest.cs:line 451
   at InTheHand.Net.ObexWebRequest.GetResponse() in D:\Documents and Settings\alan\My Documents\Visual Studio 2005\Projects\32feet Merge\InTheHand.Net.Personal\InTheHand.Net.Personal\Net\ObexWebRequest.cs:line 920
]]

comments

wrote Sep 12, 2011 at 10:27 AM

Ahh wait, at CONNECT it advertises a maximum OBEX packet length of 0x2000 (8192) so the peer shouldn't be sending packets that size...  So only a badly behaved peer would hit this.