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

default version should be "1.0", not "WARC/1.0" #38

Closed
catdevnull opened this issue Dec 31, 2023 · 1 comment · Fixed by #39
Closed

default version should be "1.0", not "WARC/1.0" #38

catdevnull opened this issue Dec 31, 2023 · 1 comment · Fixed by #39

Comments

@catdevnull
Copy link

version: "WARC/1.0".to_string(),

WarcWriter already writes WARC/ in the headers, so setting the version to WARC/1.0 prints WARC/WARC/1.0 in the header.

also, shouldn't version be an enum? :)

@jedireza
Copy link
Owner

jedireza commented Dec 31, 2023

Good catch and thanks for reporting! I created #39 to fix.

also, shouldn't version be an enum? :)

I don't think so because the version could be arbitrary. For example:

warc/src/parser.rs

Lines 132 to 135 in b2b9dfc

assert_eq!(
version(&b"WARC/2.0-alpha\r\n"[..]),
Ok((&b""[..], &"2.0-alpha"[..]))
);

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

Successfully merging a pull request may close this issue.

2 participants