Skip to content

Commit 2c59095

Browse files
huonwalexcrichton
authored andcommitted
---
yaml --- r: 116543 b: refs/heads/snap-stage3 c: 1f4d8f9 h: refs/heads/master i: 116541: e06a7de 116539: dc17e11 116535: 1f1e0ec 116527: f13a437 116511: 714c719 116479: e51a9cb v: v3
1 parent e0e90a0 commit 2c59095

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: bee4e6adac17f87b1cdc26ab69f8c0f5d82575a3
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: b662aa5ec0eb1971111bf10f9c3ef2a8f226bb0a
4+
refs/heads/snap-stage3: 1f4d8f924e78408bc4b10a29da9c42ce29bd725c
55
refs/heads/try: 009d898a9422ac04c1aa60c0e9aff3abc5fa4672
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/liburl/lib.rs

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,10 +161,10 @@ fn encode_inner(s: &str, full_url: bool) -> String {
161161
out.push_char(ch);
162162
}
163163

164-
_ => out.push_str(format!("%{:X}", ch as uint).as_slice())
164+
_ => out.push_str(format!("%{:02X}", ch as uint).as_slice())
165165
}
166166
} else {
167-
out.push_str(format!("%{:X}", ch as uint).as_slice());
167+
out.push_str(format!("%{:02X}", ch as uint).as_slice());
168168
}
169169
}
170170
}
@@ -1178,6 +1178,8 @@ mod tests {
11781178
assert_eq!(encode("@"), "@".to_string());
11791179
assert_eq!(encode("["), "[".to_string());
11801180
assert_eq!(encode("]"), "]".to_string());
1181+
assert_eq!(encode("\0"), "%00".to_string());
1182+
assert_eq!(encode("\n"), "%0A".to_string());
11811183
}
11821184

11831185
#[test]
@@ -1207,6 +1209,8 @@ mod tests {
12071209
assert_eq!(encode_component("@"), "%40".to_string());
12081210
assert_eq!(encode_component("["), "%5B".to_string());
12091211
assert_eq!(encode_component("]"), "%5D".to_string());
1212+
assert_eq!(encode_component("\0"), "%00".to_string());
1213+
assert_eq!(encode_component("\n"), "%0A".to_string());
12101214
}
12111215

12121216
#[test]

0 commit comments

Comments
 (0)