- Code: Select all
// This works fine...
CefSchemeHandler::ProcessRequest()
CefSchemeHandler::GetResponseHeaders()
CefSchemeHandler::ReadResponse() returning true bytes_read=0
CefSchemeHandlerCallback::BytesAvailable()
CefSchemeHandler::ReadResponse() returning true bytes_read=8192
CefSchemeHandler::ReadResponse() returning true bytes_read=32768
CefSchemeHandler::ReadResponse() returning true bytes_read=21749
CefSchemeHandler::ReadResponse() returning false
CefSchemeHandler::Cancel()
Sometimes this fails (nothing rendered) at the end of the stream. Calls look like this:
- Code: Select all
// Nothing rendered, no further requests...
CefSchemeHandler::ProcessRequest()
CefSchemeHandler::GetResponseHeaders()
CefSchemeHandler::ReadResponse() returning true bytes_read=0
CefSchemeHandlerCallback::BytesAvailable()
CefSchemeHandler::ReadResponse() returning true bytes_read=423
CefSchemeHandler::ReadResponse() returning true bytes_read=0
CefSchemeHandlerCallback::BytesAvailable()
CefSchemeHandler::ReadResponse() returning false
I think this happens because my code does not know that the stream has ended when announcing the 423 bytes. I have tried using CefSchemeHandlerCallback::Cancel() at the end of stream but this seems to cancel the whole request. I can fix this by inserting dummy data at the end of the stream but this is far from ideal. Here is what the call trace looks like with a dummy byte inserted:
- Code: Select all
// This works OK (but with dummy byte)...
CefSchemeHandler::ProcessRequest()
CefSchemeHandler::GetResponseHeaders()
CefSchemeHandler::ReadResponse() returning true bytes_read=0
CefSchemeHandlerCallback::BytesAvailable()
CefSchemeHandler::ReadResponse() returning true bytes_read=423
CefSchemeHandler::ReadResponse() returning true bytes_read=0
CefSchemeHandlerCallback::BytesAvailable()
CefSchemeHandler::ReadResponse() returning true bytes_read=1
CefSchemeHandler::ReadResponse() returning false
CefSchemeHandler::Cancel()
I am using cef_binary_1.963.439_windows. It looks like CefSchemeHandlerCallback::BytesAvailable() ( http://chromiumembedded.googlecode.com/ ... me_impl.cc ) should handle this situation but I have not debugged it.
Could this be a CEF problem?