Another AJAX / Scheme Handler issue with short data chunks

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Another AJAX / Scheme Handler issue with short data chunks

Postby paperjam » Tue Mar 20, 2012 7:43 am

Hello Marshall, all,

I have just discovered another issue which I have been able to workaround in my Scheme Handler. In a nutshell, I think this is what is happening.

If a page's Javascript loads some data using JQuery's load() function and the first chunk of data returned by ReadResponse() is shorter than some threshold, no subsequent data chunks arrive. That threshold is somewhere between about 700 and 8000 bytes

Typically ReadResponse is called serveral times when loading a resource. The final call returns false. We already know that CEF hangs if this final call returns no data (bytes_read==0). Now we need to be careful about the amount of data returned by the other calls too. If bytes_read is, say, 700, then it will be treated as the end of the stream. ReadResponse is called again but it seems further chunks are discarded and do not reach the calling Javascript. This only seems to affect data loaded via JQuery load() which I guess uses XMLHttpRequest. Other resource loads seem unaffected.

Now I think somewhere in Cef/Chromium some code is thinking "hmm - that data is shorter than a typical IP packet so it must be the last piece of data". That's just supposition though.

Hope this information is helpful either to improve CEF or to save others' time.
paperjam
Techie
 
Posts: 21
Joined: Thu Feb 02, 2012 6:57 am

Return to Support Forum

Who is online

Users browsing this forum: No registered users and 65 guests