-
Notifications
You must be signed in to change notification settings - Fork 284
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
Fix peek in libasync #1179
Fix peek in libasync #1179
Conversation
Actually it looks like the whole semantics of |
Yes, but internally the calls to libasync are atomic, so as long as the |
I used the peek to capture the post data for the debugger. Check this out: https://gist.github.com/etcimon/fa075692ff9ab91e739d It captures only 1 request that matches certain criterias, using this form: It works in |
Hm, okay, I missed the So actually |
Yes so that would be determined in the constructor, I think the right thing to do is use the local parameters for this |
Ohhhh, forget what I said :) This is of course irrelevant, because we are talking about the file stream and not a network stream. In this case, |
Oh, right, wouldn't this break readUntil though? |
Nevermind, it doesn't. Alright then, I'll return null and use a different strategy to actually peek that data :-p |
|
Anyway, I'll have to explicitly mention this part of |
Hm, yes I'll readAll and seek(0) to get the behavior I'm looking for. |
The peek function returned at most 1 byte due to a logical error. This also fixes an assertion failure when finalizing a read-only stream (not sure if it should fail)