Skip to content
This repository has been archived by the owner on Feb 13, 2022. It is now read-only.

should use 'END' + CRLF instead of 'END' #18

Open
windyrobin opened this issue Feb 2, 2012 · 1 comment
Open

should use 'END' + CRLF instead of 'END' #18

windyrobin opened this issue Feb 2, 2012 · 1 comment

Comments

@windyrobin
Copy link

for codes like:
buffer.indexOf('END')

if the data contains string like '*END' ,it will crash

@dylancwood
Copy link

I agree (mostly). I ran into this issue today when using this awesome module to read PHP sessions from a memcached server. If the session-string has a value containing the string "END" in it, then the session-string will be truncated, and nothing after the 'E' in 'END' will be passed to the callback. Instead of just looking for "END" or "END" + crlf' it might be best to look for the last occurrence of 'crlf + "END" + crlf inside of handle_get()

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

No branches or pull requests

2 participants