commit_hash
stringlengths
40
40
author
stringlengths
1
57
date
timestamp[s]date
2010-07-26 04:45:09
2026-04-14 18:21:10
message
stringlengths
8
1.39M
diff
stringlengths
68
51.2k
files_changed
int64
1
136
insertions
int64
0
2.35k
deletions
int64
0
1.9k
c42e3f53bf56d595a2279777b0697d86cccb45f9
Laurent Arnoud
2016-09-03T11:56:49
Add CookieError for error handling
diff --git a/src/lib.rs b/src/lib.rs index 2b8c693..75a5159 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -30,10 +30,16 @@ pub struct Cookie { pub custom: BTreeMap<String, String>, } -fn percent_decode(input: &str) -> Result<String, ()> { +#[derive(Debug)] +pub enum CookieError { + ParseError, + Utf8Error(s...
1
26
10
c9e707263f6633c8828a8eaac5e0439bff0e286e
Alex Crichton
2016-08-31T16:08:44
Upgrade to OpenSSL 0.8 Closes #53
diff --git a/Cargo.toml b/Cargo.toml index 180a947..8756ffa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ serialize-serde = ["serde"] url = "1.0" time = "0.1" rustc-serialize = { version = "0.3", optional = true } -openssl = { version = "0.7.0", optional = true } +openssl = { version = "0.8.0", optional...
2
15
9
ed5f5b0b209edf6668e37c41a01008674ba0d7b2
Alex Crichton
2016-08-01T16:40:39
Bump dev-dep on serde-json
diff --git a/Cargo.toml b/Cargo.toml index 5ceaa85..180a947 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,4 +26,4 @@ openssl = { version = "0.7.0", optional = true } serde = { version = "0.8", optional = true } [dev-dependencies] -serde_json = "0.7.0" +serde_json = "0.8.0"
1
1
1
5a1243186cd6266223792656a542891338308654
Alex Crichton
2016-08-01T16:25:57
Bump to 0.3.0
diff --git a/Cargo.toml b/Cargo.toml index 32696e6..5ceaa85 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.5" +version = "0.3.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
b48fb3c95973114df43faa8bf715612d4faff826
Alex Crichton
2016-08-01T16:25:51
Bump dependency on serde
diff --git a/Cargo.toml b/Cargo.toml index b86ca8a..32696e6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -23,7 +23,7 @@ url = "1.0" time = "0.1" rustc-serialize = { version = "0.3", optional = true } openssl = { version = "0.7.0", optional = true } -serde = { version = "0.7.5", optional = true } +serde = { version = ...
1
1
1
abae9ea1e4a292af74d5bef60315e10a4507f058
Wesley Moore
2016-06-16T17:38:02
Fix serialization of values containing: ;
diff --git a/src/lib.rs b/src/lib.rs index dc29393..2b8c693 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -186,7 +186,7 @@ impl<'a> fmt::Display for AttrVal<'a> { let AttrVal(ref attr, ref val) = *self; write!(f, "{}={}", attr, url::percent_encoding::percent_encode( val.as_bytes(), - ...
1
3
3
cd23a827da2263dd007220423316c2629ed86077
Wesley Moore
2016-06-15T14:04:27
Add failing test for cookie with ; in value
diff --git a/src/lib.rs b/src/lib.rs index b8d10b7..dc29393 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -329,4 +329,36 @@ mod tests { assert_eq!(original, roundtrip); } + + #[cfg(feature = "serialize-serde")] + #[test] + fn test_serialize_semicolons() { + #[cfg(feature = "serialize-serde...
1
32
0
ac1298e37f6a31f08dc5524815ba484f8ce9d5fd
Josh Matthews
2016-06-08T16:47:25
Bump the version number
diff --git a/Cargo.toml b/Cargo.toml index 2838267..b86ca8a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.4" +version = "0.2.5" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
84fbb7239a8d0a4803f023d9b69607fd25eba152
Florian Duraffourg
2016-05-16T16:24:07
Change the way to parse cookie attributes
diff --git a/src/lib.rs b/src/lib.rs index b6b8fb7..b72fa91 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,60 +65,67 @@ impl Cookie { c.value = try!(percent_decode(value)); for attr in pairs { - let trimmed = attr.trim(); - match &trimmed.to_ascii_lowercase()[..] { - ...
1
56
48
dd15d389d51fd2da9cefbb0e6c09189825858079
Corey Farwell
2016-04-25T14:03:27
Bump version to 0.2.4.
diff --git a/Cargo.toml b/Cargo.toml index 7e44269..927881a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.3" +version = "0.2.4" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
9ff5c738f3005b79b80ed73e78f1bcecbe2472c0
Alex Crichton
2016-04-21T22:05:56
Bump to 0.2.3
diff --git a/Cargo.toml b/Cargo.toml index d00eca0..54fad9d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.2" +version = "0.2.3" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
d5adcadb574a695f38277f7b63d89891a3a04c63
Simon Sapin
2016-03-02T15:26:02
Update to rust-url 1.0
diff --git a/Cargo.toml b/Cargo.toml index 01b400e..d00eca0 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ default = ["secure"] secure = ["openssl", "rustc-serialize"] [dependencies] -url = "0.5" +url = "1.0" time = "0.1" rustc-serialize = { version = "0.3", optional = true } openssl = { version = "0...
2
10
6
deec019957dd45129d6884e6b273b8c3ee5f9735
Alex Gaynor
2016-04-02T12:38:48
fixed a typo
diff --git a/Cargo.toml b/Cargo.toml index d91ff33..01b400e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ repository = "https://github.com/alexcrichton/cookie-rs" documentation = "http://alexcrichton.com/cookie-rs" description = """ Crate for parsing HTTP cookie headers and managing a cookie jar. Supports...
1
1
1
3d257f8627eb2bf2eeda774f8b31da8d797888fb
Alex Crichton
2015-11-26T16:32:04
Bump to 0.2.2
diff --git a/Cargo.toml b/Cargo.toml index 85060c6..d91ff33 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.1" +version = "0.2.2" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
80e71f4c86c4c7a87335132d99a39f3041485fc7
Markus Unterwaditzer
2015-11-20T13:22:46
chore(cargo): update url to 0.5
diff --git a/Cargo.toml b/Cargo.toml index e6d1292..85060c6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,7 +17,7 @@ default = ["secure"] secure = ["openssl", "rustc-serialize"] [dependencies] -url = "0.2" +url = "0.5" time = "0.1" rustc-serialize = { version = "0.3", optional = true } openssl = { version = "0...
1
1
1
3cd38db3447d54dcefb0aee2a951e355b5d64bd8
Alex Crichton
2015-11-18T22:43:02
Bump to 0.2.1
diff --git a/Cargo.toml b/Cargo.toml index e68a2b5..e6d1292 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.2.0" +version = "0.2.1" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
8b6326f467d473a552c92303783c9cf7d6f9a21b
Alex Crichton
2015-11-18T22:42:29
Handle changes in sig length over time Add a test for inequality up front to prevent panics in the `memcmp` implementation.
diff --git a/src/jar.rs b/src/jar.rs index cdde9be..ff674b6 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -387,7 +387,8 @@ mod secure { Some(pair) => pair, None => return None }; let expected = dosign(key, text); - if !memcmp::eq(&expected, &signature) { + ...
1
2
1
2d237cd961b101ce837ede32da4acdfd68dda4c4
Alex Crichton
2015-11-18T22:41:23
Update openssl dep
diff --git a/Cargo.toml b/Cargo.toml index 6bbe64c..e68a2b5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -20,4 +20,4 @@ secure = ["openssl", "rustc-serialize"] url = "0.2" time = "0.1" rustc-serialize = { version = "0.3", optional = true } -openssl = { version = "0.6.0", optional = true } +openssl = { version = "0.7....
2
3
3
fabeef159e38f9c8dd211578eda03b01cd43c41d
Alex Crichton
2015-08-11T16:30:31
Tidy up style and add comments
diff --git a/src/lib.rs b/src/lib.rs index 8103746..729e4e0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -67,8 +67,16 @@ impl Cookie { let (k, v) = unwrap_or_skip!(split(trimmed).ok()); match &k.to_ascii_lowercase()[..] { "max-age" => { - ...
1
10
2
d43463fabfbef8d1bc1b230911a35fecf3adcbcd
Patrick Fernie
2015-08-11T15:36:44
Allow parsing of negative Max-Age attribute-values A zero or negative Max-Age indicates the cookie should be expired; parse the attribute-value as an i64 then clamp to the positive range.
diff --git a/src/lib.rs b/src/lib.rs index 193afd2..8103746 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -66,7 +66,10 @@ impl Cookie { _ => { let (k, v) = unwrap_or_skip!(split(trimmed).ok()); match &k.to_ascii_lowercase()[..] { - "max-age...
1
13
1
2542d49af092014979fe9ac713d901d679629714
Alex Crichton
2015-08-11T00:33:08
Bump to 0.2.0
diff --git a/Cargo.toml b/Cargo.toml index 18b3b40..6bbe64c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.21" +version = "0.2.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docum...
1
1
1
d53de1e58b2e20a8fcf6b2c590c4e15d650a1325
Alex Crichton
2015-08-11T00:32:20
Default Cookie::path to `None` Otherwise it's not possible to distinguish the empty and `Path=/` cases! Closes #38
diff --git a/src/lib.rs b/src/lib.rs index d15c3cc..193afd2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -34,7 +34,7 @@ impl Cookie { expires: None, max_age: None, domain: None, - path: Some("/".to_string()), + path: None, secure: false, ...
1
1
1
cad08503013ac7e43529d0cd3b057df00b56cc4a
Kevin Butler
2015-07-21T16:11:47
Use base64 instead of hex for encoding This should be more compact in general and allow more data to be stored in secure cookies.
diff --git a/src/jar.rs b/src/jar.rs index d000e2f..ceb3705 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -349,7 +349,7 @@ mod secure { use Cookie; use self::openssl::crypto::{hmac, hash, memcmp, symm}; - use self::rustc_serialize::hex::{ToHex, FromHex}; + use self::rustc_serialize::base64::{ToBase64, F...
1
6
6
b34c18604569c19084ec9dceb5a66116bdf32616
Alex Crichton
2015-06-01T22:54:47
Bump to 0.1.21
diff --git a/Cargo.toml b/Cargo.toml index 279771c..18b3b40 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.20" +version = "0.1.21" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
05520efcd91c622d4211acee238545ddb334e219
Sean McArthur
2015-05-28T18:20:46
include jar even if secure feature is disabled The `secure` module and the `signed` and `encrypted` methods are the only parts of `jar` that depend on `openssl`, so this adds all the other parts of jar to be used even without those crates.
diff --git a/Cargo.toml b/Cargo.toml index 16861fe..279771c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,8 @@ similar to Rails' cookie jar. """ [features] -default = ["openssl", "rustc-serialize"] +default = ["secure"] +secure = ["openssl", "rustc-serialize"] [dependencies] url = "0.2" diff --git a/src...
3
68
33
0893674c2072020ed9f6a446a5ef6990745077aa
Alex Crichton
2015-04-28T23:48:20
Bump to 0.1.20
diff --git a/Cargo.toml b/Cargo.toml index 8406062..16861fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.19" +version = "0.1.20" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
12e378fba2109be29a86f0dfe64b28ae5aa9971a
Pyfisch
2015-04-28T19:02:45
Add no-default-features, providing just the parsing functionality It is not practical for some packages to pull a dependency on openssl, but they want to use cookie parsing, so compiling with --no-default-features removes the cookie jar and with this the dependency on openssl.
diff --git a/Cargo.toml b/Cargo.toml index 1acf20a..85d4469 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,8 +12,14 @@ encrypted, signed, and permanent cookie chars composed together in amanner similar to Rails' cookie jar. """ +[features] +default = ["openssl"] + [dependencies] -openssl = "0.6.0" url = "0.2" t...
2
10
2
8a0169c635e6cc8957ef4317a34b3bc5e6c1b80b
Alex Crichton
2015-04-22T18:52:52
Bump to 0.1.19
diff --git a/Cargo.toml b/Cargo.toml index 0722cab..1acf20a 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.18" +version = "0.1.19" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
43dbcef89feb69537b11424452053cbc2e3432bf
Beau Hartshorne
2015-04-22T18:31:58
unbreak build percent_decode, percent_encode, and DEFAULT_ENCODE_SET were moved to the percent_encoding module in https://github.com/servo/rust-url/commit/54b97f14bd24eacf2e9eaa089d9ee5be7fd2aa1c
diff --git a/src/lib.rs b/src/lib.rs index 738e25a..38dc5ed 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -53,11 +53,11 @@ impl Cookie { let mut pairs = s.trim().split(';'); let keyval = match pairs.next() { Some(s) => s, _ => return Err(()) }; let (name, value) = try!(split(keyval)); - ...
1
6
4
a51e968d77694e2e9bda720cdcee89bb656c6cac
Alex Crichton
2015-04-06T16:43:11
Bump to 0.1.18
diff --git a/Cargo.toml b/Cargo.toml index 3e7089d..0722cab 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.17" +version = "0.1.18" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
1ae98890efc5eb25bf2b97fb5ab1bc99d16e63cc
wahaha
2015-04-06T00:54:59
upgrade openssl to v0.6
diff --git a/Cargo.toml b/Cargo.toml index a51c1a9..3e7089d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ similar to Rails' cookie jar. """ [dependencies] -openssl = "0.5" +openssl = "0.6.0" url = "0.2" time = "0.1" rustc-serialize = "0.3"
1
1
1
6d32470f60e3ac335c087d132c58118d997d405a
Alex Crichton
2015-04-02T19:31:01
Bump to 0.1.17
diff --git a/Cargo.toml b/Cargo.toml index 83d4e58..a51c1a9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.16" +version = "0.1.17" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
18c6939c2476f6b6c4967545e9f74652314fa38a
Sean McArthur
2015-04-02T19:28:20
rustup: str.splitn has different meaning
diff --git a/src/lib.rs b/src/lib.rs index 36b0c43..738e25a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -109,7 +109,7 @@ impl Cookie { macro_rules! try { ($e:expr) => (match $e { Some(s) => s, None => return Err(()) }) } - let mut parts = s.trim().splitn(1, '='); + ...
1
1
1
a87c6c6666e23f38250c2018e8614b94d019d886
Alex Crichton
2015-03-25T18:05:01
Update to rust master
diff --git a/Cargo.toml b/Cargo.toml index a0663d6..83d4e58 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.15" +version = "0.1.16" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
3
3
3
a5810eb7f8299259e3ab16d7c0648201bbed1b4f
Alex Crichton
2015-03-21T03:43:15
Bump to 0.1.15
diff --git a/Cargo.toml b/Cargo.toml index 0edf9d9..a0663d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.14" +version = "0.1.15" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
3
61
53
263876df6835b5064be29e8ec4ca69c8f48be53c
Alex Crichton
2015-03-14T18:25:15
Update to rust master
diff --git a/src/lib.rs b/src/lib.rs index 3236303..4cfc6fa 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ #![doc(html_root_url = "http://alexcrichton.com/cookie-rs")] -#![feature(core, collections, io)] +#![feature(core, collections)] #![cfg_attr(test, deny(warnings))] extern crate url;
1
1
1
5168d84d0c90f5255df7e23ac25f2eea8eab8af8
Alex Crichton
2015-02-28T06:09:40
Bump to 0.1.14
diff --git a/Cargo.toml b/Cargo.toml index f16b439..0edf9d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.13" +version = "0.1.14" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
2
4
4
45f26ffa09b7b79cc4eaae16194d3b3de58e7919
Pyry Kontio
2015-02-28T05:59:56
OpenSSL 0.4 -> 0.5, new IO
diff --git a/Cargo.toml b/Cargo.toml index 6a7d0ad..f16b439 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ similar to Rails' cookie jar. """ [dependencies] -openssl = "0.4" +openssl = "0.5" url = "0.2" time = "0.1" rustc-serialize = "0.3" diff --git a/src/jar.rs b/src/jar.rs index 5b25aa1..4026318 10...
3
4
3
c2c29258298b900f52d503a819e6377c9272400c
Alex Crichton
2015-02-26T18:50:43
Update to rust master
diff --git a/src/jar.rs b/src/jar.rs index 22e13d2..5b25aa1 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -317,7 +317,7 @@ mod secure { } fn split_value(val: &str) -> Option<(&str, Vec<u8>)> { - let parts = val.split_str("--"); + let parts = val.split("--"); let ext = match parts.last()...
1
1
1
037c0b069897d8e1f9b61a765e9fba90e3f49c4e
Alex Crichton
2015-02-25T01:05:47
Bump to 0.1.13
diff --git a/Cargo.toml b/Cargo.toml index b4fa9d9..6a7d0ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.12" +version = "0.1.13" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
de26b77cbd804a02fd9f2753cf46d0358c3bbad5
Alex Crichton
2015-02-25T01:05:31
Bump rustc-serialize
diff --git a/Cargo.toml b/Cargo.toml index 8650aaa..b4fa9d9 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,4 +16,4 @@ similar to Rails' cookie jar. openssl = "0.4" url = "0.2" time = "0.1" -rustc-serialize = "0.2" +rustc-serialize = "0.3"
1
1
1
b99ce86ce79c1666b0972643e71c90fd93851a74
Alex Crichton
2015-02-23T07:43:58
Use some deref coercions
diff --git a/src/lib.rs b/src/lib.rs index 1d75cf5..bb01137 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -114,7 +114,7 @@ impl Cookie { } pub fn pair(&self) -> AttrVal { - AttrVal(&self.name[..], &self.value[..]) + AttrVal(&self.name, &self.value) } } @@ -130,7 +130,7 @@ impl<'a> fmt::D...
1
3
3
afc2b503a5066d679817341fa404ff1d28c568f0
Alex Crichton
2015-02-19T16:07:12
Update to rust master
diff --git a/src/lib.rs b/src/lib.rs index 94ac885..762d863 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(core, collections, std_misc, io)] +#![feature(core, collections, old_io)] #![cfg_attr(test, deny(warnings))] extern crate url;
1
1
1
74fe15f6c30ca680cd7220f35873eeb7257a927c
Alex Crichton
2015-02-14T17:17:06
Bump to 0.1.12
diff --git a/Cargo.toml b/Cargo.toml index c7aa009..8650aaa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.11" +version = "0.1.12" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
c0db28950c420aeb907d72ca6e52ad20b00627c5
Robin Gloster
2015-02-14T16:53:20
bump openssl
diff --git a/Cargo.toml b/Cargo.toml index 8c58986..c7aa009 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ similar to Rails' cookie jar. """ [dependencies] -openssl = "0.3" +openssl = "0.4" url = "0.2" time = "0.1" rustc-serialize = "0.2"
1
1
1
6b1da67096cbb6043bfed59e222bd00b4599d3a6
Raul Gutierrez S
2015-02-08T02:27:35
Fix typos Signed-off-by: Raul Gutierrez S <rgs@itevenworks.net>
diff --git a/src/jar.rs b/src/jar.rs index cefaf6e..22e13d2 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -8,7 +8,7 @@ //! //! A cookie jar can also be borrowed to a child cookie jar with new //! functionality such as automatically signing cookies, storing permanent -//! cookies, etc. This functionality can also be ch...
1
2
2
4a1f42cf86cea43fb202cbd9fdda187bed51d0d8
Alex Crichton
2015-02-03T17:21:47
Bump to 0.1.11
diff --git a/Cargo.toml b/Cargo.toml index 8e6814f..8c58986 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.10" +version = "0.1.11" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docu...
1
1
1
b93bc0f39c2edab0898bdfe11172e689bb5c9775
Alex Crichton
2015-02-03T17:21:33
Bump dep on openssl
diff --git a/Cargo.toml b/Cargo.toml index f506ed3..8e6814f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,7 +13,7 @@ similar to Rails' cookie jar. """ [dependencies] -openssl = "0.2" +openssl = "0.3" url = "0.2" time = "0.1" rustc-serialize = "0.2" diff --git a/src/jar.rs b/src/jar.rs index 10bcc5f..cefaf6e 10...
3
6
6
155a29092a7481bae90614326e58ff845fc3fd2f
Alex Crichton
2015-02-03T16:31:56
Bump to 0.1.10
diff --git a/Cargo.toml b/Cargo.toml index 054e9f3..f506ed3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.9" +version = "0.1.10" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docum...
2
6
5
d18c3cf192a100725b291fd1f34a652470028cfd
Alex Crichton
2015-01-29T16:42:44
Add some feature gates
diff --git a/src/lib.rs b/src/lib.rs index 7621e1a..66b4cc4 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,5 +1,5 @@ +#![feature(core, collections, std_misc)] #![cfg_attr(test, deny(warnings))] -#![cfg_attr(test, allow(unstable))] extern crate url; extern crate time;
1
1
1
52519bc504fc10a4ca1c75ea9d6f6ac7bc37459b
Alex Crichton
2015-01-24T19:57:39
Bump to 0.1.9
diff --git a/Cargo.toml b/Cargo.toml index 33ed31e..054e9f3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.8" +version = "0.1.9" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
3
26
26
5deaa809fd01f5422fa49d98f794e5a33e20570c
Josh Matthews
2015-01-15T07:31:31
Add more parsing tests.
diff --git a/src/lib.rs b/src/lib.rs index 55ab2d3..29cdfd1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -169,9 +169,17 @@ mod tests { #[test] fn parse() { + assert!(Cookie::parse("bar").is_err()); + assert!(Cookie::parse("=bar").is_err()); + assert!(Cookie::parse(" =bar").is_err()); + ...
1
13
0
0c211a46c20c6ac94eb3c15fde3ebdb04c3ecbaf
Josh Matthews
2015-01-15T06:09:23
Tighten up parsing - trim whitespace after splitting; disregard empty names; disregard empty domains.
diff --git a/src/lib.rs b/src/lib.rs index a43e12f..55ab2d3 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -54,6 +54,9 @@ impl Cookie { let keyval = try!(pairs.next().ok_or(())); let (name, value) = try!(split(keyval)); let name = url::percent_decode(name.as_bytes()); + if name.is_empty()...
1
10
1
aabca61a1d95b427b4dc117b768cf4271482857e
Alex Crichton
2015-01-09T20:11:23
Move to some slicing
diff --git a/src/lib.rs b/src/lib.rs index c34c93a..a43e12f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -60,12 +60,12 @@ impl Cookie { for attr in pairs { let trimmed = attr.trim(); - match trimmed.to_ascii_lowercase().as_slice() { + match &trimmed.to_ascii_lowercase()[] { ...
1
6
6
abbf8f9d117d8e49643e96665b6ca05d388c6f76
Alex Crichton
2015-01-09T20:08:41
Bump to 0.1.8
diff --git a/Cargo.toml b/Cargo.toml index 84310cf..33ed31e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.7" +version = "0.1.8" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
3
7
8
3550ba7c84185242469635fe4b6b6e2fb105c91a
Alex Crichton
2015-01-08T22:58:29
Bump to 0.1.7
diff --git a/Cargo.toml b/Cargo.toml index 9a13872..84310cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.6" +version = "0.1.7" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
2
1
2
de952d386a9aeb3a6fd909def2eee3428ed7ab1c
Alex Crichton
2015-01-05T05:07:08
Bump version number
diff --git a/Cargo.toml b/Cargo.toml index 01425d2..9a13872 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.5" +version = "0.1.6" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
aea0bf0c2f48f58b078f5dd105f5ef343341d5e8
Tetsuharu OHZEKI
2015-01-05T01:48:30
Update to rustc 0.13.0-nightly (c6c786671 2015-01-04 00:50:59 +0000)
diff --git a/src/jar.rs b/src/jar.rs index 43e787a..306fc13 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -275,7 +275,9 @@ impl<'a> CookieJar<'a> { } } -impl<'a> Iterator<Cookie> for Iter<'a> { +impl<'a> Iterator for Iter<'a> { + type Item = Cookie; + fn next(&mut self) -> Option<Cookie> { loop {...
2
4
2
301fa2337d85e99487417fb7133a183eb405feb1
Alex Crichton
2015-01-03T22:52:11
Update to rust master
diff --git a/Cargo.toml b/Cargo.toml index 8385244..01425d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.4" +version = "0.1.5" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
2
3
3
bc2b0afb0d1c9c5116f6bd2ab5111502cd1ec2c4
Alex Crichton
2014-12-31T16:46:05
Add some small tests for changes
diff --git a/src/lib.rs b/src/lib.rs index a88fef2..7276f63 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -165,6 +165,9 @@ mod tests { assert_eq!(Cookie::parse(" foo=bar ").unwrap(), expected); expected.httponly = true; assert_eq!(Cookie::parse(" foo=bar ;HttpOnly").unwrap(), expected); + ...
1
3
0
0a92a509c25ccb8360d3448c7794d5d484097e65
Josh Matthews
2014-12-31T15:57:23
Skip cookie attributes that don't parse well.
diff --git a/src/lib.rs b/src/lib.rs index 420e840..a88fef2 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -45,13 +45,13 @@ impl Cookie { } pub fn parse(s: &str) -> Result<Cookie, ()> { - macro_rules! try_option{ ($e:expr) => ( - match $e { Some(s) => s, None => return Err(()) } + macr...
1
7
7
3b298dacfea482ac9e8137e4267c1bbebca0fbb3
Josh Matthews
2014-12-30T22:12:05
Relax parsing requirements to better fit http://tools.ietf.org/html/rfc6265. It's still much more strict than specified.
diff --git a/src/lib.rs b/src/lib.rs index d3f7dc4..420e840 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,6 +6,7 @@ extern crate time; extern crate openssl; extern crate "rustc-serialize" as serialize; +use std::ascii::AsciiExt; use std::collections::BTreeMap; use std::fmt; use std::str::FromStr; @@ -58,18 +59,...
1
30
12
a06c45ca06f4b18b59397886e1d2fc3bf59875f8
Alex Crichton
2014-12-23T17:06:00
Use rustc-serialize as a dependency
diff --git a/Cargo.toml b/Cargo.toml index 85dfaa5..8385244 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.3" +version = "0.1.4" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
2
3
2
993c040bb50efd3b445e5c5e9314f685d9b6b608
Alex Crichton
2014-12-23T16:16:14
Update to rust master
diff --git a/Cargo.toml b/Cargo.toml index 08f3a4f..85dfaa5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.2" +version = "0.1.3" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
2
7
14
590a04801d30bc4bceac59796cca90cf2dac0f2c
Alex Crichton
2014-12-21T17:43:50
Bump version
diff --git a/Cargo.toml b/Cargo.toml index 5cd13a2..08f3a4f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.1" +version = "0.1.2" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
1
1
dc89ebb7881b031ef5966bf3f4ac2ef396fee254
Aaron Weiss
2014-12-21T17:38:14
Using BTreeMap instead of now-removed TreeMap.
diff --git a/src/lib.rs b/src/lib.rs index c3670c4..de4c612 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -6,7 +6,7 @@ extern crate time; extern crate openssl; extern crate serialize; -use std::collections::TreeMap; +use std::collections::BTreeMap; use std::fmt; use std::str::FromStr; @@ -24,7 +24,7 @@ pub struct...
1
3
3
cfdede50c326cce72d94d112c9c92a2462645626
Alex Crichton
2014-12-19T19:42:48
Use registry deps
diff --git a/Cargo.toml b/Cargo.toml index 22f3dfa..5cd13a2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -13,13 +13,13 @@ similar to Rails' cookie jar. """ [dependencies.openssl] -git = "https://github.com/sfackler/rust-openssl" +#git = "https://github.com/sfackler/rust-openssl" version = "0.2.0" [dependencies.u...
1
3
3
6468a6c80ba513cd71e19214890aeb11fbd8d2dd
Alex Crichton
2014-12-19T16:30:17
Update to rust master
diff --git a/Cargo.toml b/Cargo.toml index 3a133a5..22f3dfa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.1.0" +version = "0.1.1" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
3
5
5
346a7cc6e90037eea4d6b92645fa0fb5e68b3a38
alekspak
2014-12-17T21:48:06
Fixed shadowed lifetimes for src/jar.rs
diff --git a/src/jar.rs b/src/jar.rs index 5691f8e..90c8d59 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -103,7 +103,7 @@ impl<'a> CookieJar<'a> { } } - fn root<'a>(&'a self) -> &'a Root { + fn root<'b>(&'b self) -> &'b Root { let mut cur = self; loop { match cur.flav...
1
4
4
272ac27b824c008eddd4842239269cb591f93db5
Alex Crichton
2014-12-04T07:44:00
Update version dep on url
diff --git a/Cargo.toml b/Cargo.toml index 6e96e52..3a133a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ version = "0.2.0" [dependencies.url] git = "https://github.com/servo/rust-url" -version = "0.1.0" +version = "0.2.0" [dependencies.time] git = "https://github.com/rust-lang/time"
1
1
1
dd52337fd72124e0cb77c97e1dc7b9d601f9eaa4
Alex Crichton
2014-12-03T07:26:40
Fix version deps
diff --git a/Cargo.toml b/Cargo.toml index 3a133a5..6e96e52 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,7 +18,7 @@ version = "0.2.0" [dependencies.url] git = "https://github.com/servo/rust-url" -version = "0.2.0" +version = "0.1.0" [dependencies.time] git = "https://github.com/rust-lang/time"
1
1
1
8d1b4bb8d5ed06e58c162eb235a4ccd210b68108
Alex Crichton
2014-12-03T06:51:01
Bump version number Closes #16
diff --git a/Cargo.toml b/Cargo.toml index c44a998..3a133a5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] -version = "0.0.1" +version = "0.1.0" license = "MIT/Apache-2.0" repository = "https://github.com/alexcrichton/cookie-rs" docume...
1
4
1
7289bfd50aa03cb9fd44bb76047f284484acf9e4
Alex Crichton
2014-12-01T19:03:38
Add some documentation
diff --git a/src/jar.rs b/src/jar.rs index 3339902..5691f8e 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -73,6 +73,7 @@ struct Root { key: Vec<u8>, } +/// Iterator over the cookies in a cookie jar pub struct Iter<'a> { jar: &'a CookieJar<'a>, keys: Vec<String>, @@ -262,6 +263,12 @@ impl<'a> CookieJar<...
1
7
0
dade80d0e2c5cfc5eee8ff40de205e11249d2c4b
Alex Crichton
2014-12-01T18:56:57
Switch .to_vec() to .iter()
diff --git a/src/jar.rs b/src/jar.rs index f202af6..3339902 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -11,7 +11,7 @@ //! cookies, etc. This functionality can also be chaned together. use std::collections::{HashMap, HashSet}; -use std::cell::{RefCell}; +use std::cell::RefCell; use time; use Cookie; @@ -73,6 +7...
1
51
30
74b03f9815a4b2adbe8ef5c4af8373de432b3287
Stanislav Panferov
2014-11-28T11:31:15
Refactor to make CookieJar iterable.
diff --git a/src/jar.rs b/src/jar.rs index fe02fce..cd93e55 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -11,7 +11,7 @@ //! cookies, etc. This functionality can also be chaned together. use std::collections::{HashMap, HashSet}; -use std::cell::RefCell; +use std::cell::{RefCell}; use time; use Cookie; @@ -67,8 +6...
1
74
25
1ae2a7d5f1b66b55b8e2bd1b73089bc7f8be892a
Peter Atashian
2014-11-28T07:10:42
Update to latest Rust
diff --git a/src/jar.rs b/src/jar.rs index fe02fce..d2392cb 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -304,7 +304,7 @@ mod secure { } fn dosign(root: &Root, val: &str) -> Vec<u8> { - let mut hmac = hmac::HMAC(hash::SHA1, root.key.as_slice()); + let mut hmac = hmac::HMAC(hash::HashType::SHA1,...
1
4
4
cbeb942c35bc130e578725ab829ff3cb976a7c92
Alex Crichton
2014-11-23T20:13:27
Move all deps back to git
diff --git a/Cargo.toml b/Cargo.toml index ee06710..c44a998 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -14,6 +14,9 @@ similar to Rails' cookie jar. [dependencies.openssl] git = "https://github.com/sfackler/rust-openssl" -[dependencies] -url = "*" -time = "*" + +[dependencies.url] +git = "https://github.com/servo/r...
1
6
3
93f76552824e313a4fb006fc10cec2611265a505
Sergey Pchelincev
2014-11-23T13:22:54
Update Cargo.toml
diff --git a/Cargo.toml b/Cargo.toml index ad274cf..ee06710 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -12,7 +12,8 @@ encrypted, signed, and permanent cookie chars composed together in amanner similar to Rails' cookie jar. """ +[dependencies.openssl] +git = "https://github.com/sfackler/rust-openssl" [dependencies...
1
2
1
6c37c3f05d436a9f40f5ae99c6956bdb59b92216
Alex Crichton
2014-11-22T04:02:13
Add some metadata keys
diff --git a/Cargo.toml b/Cargo.toml index 15a1241..ad274cf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,12 +3,16 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] version = "0.0.1" +license = "MIT/Apache-2.0" +repository = "https://github.com/alexcrichton/cookie-rs" +documentation = "http://a...
1
12
8
c7e1464489ec0cf338196fb4e2a8e7aa74aa672c
Alex Crichton
2014-11-18T16:19:55
Use namespaces!
diff --git a/src/jar.rs b/src/jar.rs index 09437d0..fe02fce 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -16,8 +16,6 @@ use time; use Cookie; -use self::Flavor::{FlavorChild, FlavorRoot}; - /// A jar of cookies for managing a session /// /// # Example @@ -55,8 +53,8 @@ pub struct CookieJar<'a> { } enum Flavo...
1
15
17
3988d891048832bbae495a406b165ab3b897dbc7
Kyle Dewey
2014-11-18T05:46:48
Added import for enum, as per https://github.com/rust-lang/rust/pull/18973
diff --git a/src/jar.rs b/src/jar.rs index 6c3e159..09437d0 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -16,6 +16,8 @@ use time; use Cookie; +use self::Flavor::{FlavorChild, FlavorRoot}; + /// A jar of cookies for managing a session /// /// # Example
1
2
0
be65e588449333b6cfee7b3720f5672cc945cc39
Alex Crichton
2014-11-17T16:27:36
Update to rust master
diff --git a/src/lib.rs b/src/lib.rs index b16a5ea..75952c0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -8,7 +8,7 @@ extern crate serialize; use std::collections::TreeMap; use std::fmt; -use std::from_str::FromStr; +use std::str::FromStr; pub use jar::CookieJar;
1
1
1
c93ff2ff1754363fafb477e9cf0bcc19c0c5632b
Stanislav Panferov
2014-11-13T21:05:51
Add link to `message_encryptor.rb` from ActiveSupport.
diff --git a/src/jar.rs b/src/jar.rs index 506d35b..6c3e159 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -309,6 +309,8 @@ mod secure { hmac.finalize() } + // Implementation details were taken from Rails. See + // https://github.com/rails/rails/blob/master/activesupport/lib/active_support/message_en...
1
2
0
5f0b5f51511f193589f44e7c2aae5e4d92b2d401
Stanislav Panferov
2014-11-13T20:39:46
Normalize key using SHA-256 hash as Rails suggests.
diff --git a/src/jar.rs b/src/jar.rs index f4a7bdc..506d35b 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -79,15 +79,20 @@ impl<'a> CookieJar<'a> { /// The given key is used to sign cookies in the signed cookie jar. pub fn new(key: &[u8]) -> CookieJar<'static> { - assert!(key.len() >= secure::MIN_KEY_L...
1
12
4
ff8902511b5a47bfc1c4a06977db124a6b6ab494
Stanislav Panferov
2014-11-13T13:22:35
Implement encryption. Fixes #6.
diff --git a/src/jar.rs b/src/jar.rs index 6d1ae28..f4a7bdc 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -13,9 +13,6 @@ use std::collections::{HashMap, HashSet}; use std::cell::RefCell; use time; -use serialize::hex::{ToHex, FromHex}; - -use openssl::crypto::{hmac, hash, memcmp}; use Cookie; @@ -28,7 +25,7 @@ us...
1
177
63
2c90c2a56848fbc8e798770f023322f62dddac81
Alex Crichton
2014-11-13T17:55:10
Update to using rust-lang/time
diff --git a/Cargo.toml b/Cargo.toml index 3d02da7..15a1241 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -9,3 +9,6 @@ git = "https://github.com/sfackler/rust-openssl" [dependencies.url] git = "https://github.com/servo/rust-url" + +[dependencies.time] +git = "https://github.com/rust-lang/time"
1
3
0
58c9fece111e232260782a959ef2b08e909bf8cb
Stanislav Panferov
2014-11-13T13:42:51
Update to Rust master
diff --git a/src/jar.rs b/src/jar.rs index ae0ea78..6d1ae28 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -148,8 +148,8 @@ impl<'a> CookieJar<'a> { if root.removed_cookies.borrow().contains(&name) { return None } - let mut ret = root.new_map.borrow().find(&name) - ...
1
2
2
793131ef6ac35c0a337f9eb3a04587ef55049511
Sean McArthur
2014-11-10T18:38:30
change jar.delta() to return a Vec<Cookie> Fixes #2
diff --git a/src/jar.rs b/src/jar.rs index 0c5788c..ae0ea78 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -248,7 +248,7 @@ impl<'a> CookieJar<'a> { /// Calculates the changes that have occurred to this cookie jar over time, /// returning a vector of `Set-Cookie` headers. - pub fn delta(&self) -> Vec<String...
1
3
3
6e0f689e2275177f6bd9a15a6e2d7c792434e944
Sean McArthur
2014-11-10T18:28:19
add Cookie.pair(), returning a formatter for name=value fixes #3
diff --git a/src/lib.rs b/src/lib.rs index c7546b4..b16a5ea 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -27,6 +27,7 @@ pub struct Cookie { pub custom: TreeMap<String, String>, } + impl Cookie { pub fn new(name: String, value: String) -> Cookie { Cookie { @@ -84,13 +85,25 @@ impl Cookie { ...
1
23
6
89a026643e2dcf1af8155be88714af5ad8ee517b
Alex Crichton
2014-10-30T15:36:23
fail => panic
diff --git a/src/jar.rs b/src/jar.rs index 37fb60a..0c5788c 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -101,7 +101,7 @@ impl<'a> CookieJar<'a> { /// cookie jar from an incoming request. pub fn add_original(&mut self, cookie: Cookie) { match self.flavor { - FlavorChild(..) => fail!("can't ...
1
1
1
b2bc25e50170e95bf241ca5a01c10ac96d080c57
Alex Crichton
2014-10-09T17:12:34
Update openssl dep
diff --git a/src/jar.rs b/src/jar.rs index 8cd1e96..37fb60a 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -215,7 +215,7 @@ impl<'a> CookieJar<'a> { fn dosign(root: &Root, val: &str) -> Vec<u8> { let mut hmac = hmac::HMAC(hash::SHA1, root.key.as_slice()); hmac.update(val.as_bytes()); - ...
1
1
1
29b278cb6c4cedab04ad6036150cfed0662a635a
Alex Crichton
2014-10-01T23:02:29
Use rust-openssl's memcmp::eq method now
diff --git a/src/jar.rs b/src/jar.rs index d0f818b..8cd1e96 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -15,7 +15,7 @@ use std::cell::RefCell; use time; use serialize::hex::{ToHex, FromHex}; -use openssl::crypto::{hmac, hash}; +use openssl::crypto::{hmac, hash, memcmp}; use Cookie; @@ -199,7 +199,11 @@ impl<'a...
1
7
3
282884ce916a427160db95691ecf91df878fe2b9
Alex Crichton
2014-09-22T15:24:00
Update to rust master
diff --git a/src/jar.rs b/src/jar.rs index c54633e..d0f818b 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -49,8 +49,8 @@ pub struct CookieJar<'a> { } enum Flavor<'a> { - Child(Child<'a>), - Root(Root), + FlavorChild(Child<'a>), + FlavorRoot(Root), } struct Child<'a> { @@ -75,7 +75,7 @@ impl<'a> Cookie...
1
13
13
456aca089ed26677af6bf741a62c774a8fa0f530
Alex Crichton
2014-09-03T16:25:25
Move to servo/rust-url
diff --git a/Cargo.toml b/Cargo.toml index 4bfc52d..3d02da7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -5,5 +5,7 @@ authors = ["Alex Crichton <alex@alexcrichton.com>"] version = "0.0.1" [dependencies.openssl] - git = "https://github.com/sfackler/rust-openssl" + +[dependencies.url] +git = "https://github.com/servo...
2
12
5
5ee026383ee541deeba74395b1cd16c4e3ee2d1c
Alex Crichton
2014-08-16T16:12:06
Update to master
diff --git a/src/lib.rs b/src/lib.rs index 49f9b14..beb3e45 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -78,7 +78,7 @@ impl Cookie { return Ok(c); fn split<'a>(s: &'a str) -> Result<(&'a str, &'a str), ()> { - let mut parts = s.trim().splitn('=', 1); + let mut parts = s.trim()....
1
1
1
6104eb1d63cbd38343d57cd3b9352e8abee97018
Alex Crichton
2014-07-23T16:13:50
Update to master
diff --git a/src/jar.rs b/src/jar.rs index 84ea4fc..c54633e 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -79,7 +79,7 @@ impl<'a> CookieJar<'a> { orig_map: HashMap::new(), new_map: RefCell::new(HashMap::new()), removed_cookies: RefCell::new(HashSet::new()), - ...
1
1
1
8e1f619101e4ddbb2c1917609aec2ddd280a0173
Alex Crichton
2014-07-15T15:56:12
Bring back the root static lifetime
diff --git a/src/jar.rs b/src/jar.rs index 31942ca..84ea4fc 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -72,10 +72,8 @@ struct Root { impl<'a> CookieJar<'a> { /// Creates a new empty cookie jar with the given signing key. /// - /// The given key is used to sign cookies in the signed cookie jar. The - /...
1
2
4
e0be0bf2a6b01660c79e1b99c9b5e346735c6e16
Alex Crichton
2014-07-08T15:53:18
New cargo conventions
diff --git a/Cargo.toml b/Cargo.toml index 70cc87a..4bfc52d 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,10 +4,6 @@ name = "cookie" authors = ["Alex Crichton <alex@alexcrichton.com>"] version = "0.0.1" -[[lib]] - -name = "cookie" - [dependencies.openssl] git = "https://github.com/sfackler/rust-openssl" diff -...
2
0
4
97999c3aede58132bb7eb376f659c1116eb9f841
Alex Crichton
2014-07-07T13:35:08
Update to master
diff --git a/src/cookie.rs b/src/cookie.rs index a3dc3fe..ff2fc3f 100644 --- a/src/cookie.rs +++ b/src/cookie.rs @@ -51,8 +51,8 @@ impl Cookie { let mut pairs = s.trim().split(';'); let keyval = try_option!(pairs.next()); let (name, value) = try!(split(keyval)); - c.name = url::decode_...
1
2
2
cd4d5bd6d8d2da9a37cc5ed471c8d65d86cc5270
Alex Crichton
2014-07-03T06:14:16
Fix a tripped assertion
diff --git a/src/jar.rs b/src/jar.rs index af6502c..00ce2e1 100644 --- a/src/jar.rs +++ b/src/jar.rs @@ -121,6 +121,7 @@ impl<'a> CookieJar<'a> { Some(sig) => sig, _ => return None, }; + if signature.len() == cookie.value.len() { return None } ...
1
5
0