Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
sclaggett opened this issue Nov 18, 2014 · 0 comments
Open

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

sclaggett opened this issue Nov 18, 2014 · 0 comments

Comments

@sclaggett
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant