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.
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.