as3httpclient icon indicating copy to clipboard operation
as3httpclient copied to clipboard

"Error: No data available" raised in HttpBuffer.as, resolved

Open sclaggett opened this issue 11 years ago • 0 comments

Thanks for the library, I've found it to be quite useful! It does have a bug that I encountered during development that I eventually hunted down and resolved.

Every once in a while, the error "No data available" will be thrown from HttpBuffer.readChunks() when readLine() returns null. This will occur when the chunk size (e.g. "3ef\r\n") is split between two TCP packets, something that is infrequent but still allowed. The fix is quite simple, just change the line: throw new Error("No data available"); To: return false; That's currently line 115 of src/org/httpclient/io/HttpBuffer.as.

sclaggett avatar Nov 18 '14 23:11 sclaggett