elnode icon indicating copy to clipboard operation
elnode copied to clipboard

elnode error log contains file contents, including binary data

Open db48x opened this issue 13 years ago • 3 comments

This is a problem when the file contains bytes that form invalid utf-8 sequences, as it goes to an interactive prompt asking the user what encoding to use. It could just default to encoding the file/buffer as raw-text to begin with, or it could run the binary data through some kind of encoding first. For now I'm just turning off the logging by setting elnode--do-error-logging to nil.

Example: 20120813101139: elnode-http-send-string elnode-webserver-proc 10.0.38.28:14778 [[GIF87aT^@T^@\366^?^@\377\377\377^@^X\214\354]]

db48x avatar Aug 13 '12 17:08 db48x

Thanks for the report, I will get a fix together unless you want to?

nicferrier avatar Aug 13 '12 19:08 nicferrier

I just tried running it through url-hexify-string. This works, of course, but it looks silly because every space character becomes a %20.

db48x avatar Aug 15 '12 22:08 db48x

One thing: the latest Elnode (0.9.9) does not log send-strings by default. So you could check you're using that. I'm not even sure logging send-strings ever is a good idea, I did it for debugging.

nicferrier avatar Aug 16 '12 07:08 nicferrier