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

Consider not to tolerate line breaks in bencoded data #19

Open
josecelano opened this issue Dec 4, 2024 · 0 comments
Open

Consider not to tolerate line breaks in bencoded data #19

josecelano opened this issue Dec 4, 2024 · 0 comments

Comments

@josecelano
Copy link
Member

Relates to: #14 (comment)

@da2ce7 asked why we tolerate line breaks in bencoded data.

I think I only added it to tolerate the line break at the end of the bencode value because it makes it more flexible to run the application like this:

echo "4:spam" | cargo run

If we don't tolerate line breaks, you only can use this:

printf "4:spam" | cargo run

I don't like it. Maybe we should "clean" the input stream only in the main app (when we are reading from stdinput).

cc @da2ce7

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