Skip to content

Consider not to tolerate line breaks in bencoded data #19

@josecelano

Description

@josecelano

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions