Skip to content

Commit fdf66f5

Browse files
committed
---
yaml --- r: 20893 b: refs/heads/snap-stage3 c: 1e3143b h: refs/heads/master i: 20891: b228e15 v: v3
1 parent 9372c56 commit fdf66f5

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
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: e430a699f2c60890d9b86069fd0c68a70ece7120
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 03330baf9ca15d88e58753167b1eb40ca03cba78
4+
refs/heads/snap-stage3: 1e3143b34e66ca5157b03d3658d64d7c01563186
55
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b

branches/snap-stage3/src/libstd/net_url.rs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,8 @@ fn get_path(rawurl: ~str, authority : bool) ->
537537
for str::each_chari(rawurl) |i,c| {
538538
match c {
539539
'A' to 'Z' | 'a' to 'z' | '0' to '9' | '&' |'\'' | '(' | ')' | '.'
540-
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '=' => {
540+
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
541+
| '_' => {
541542
again;
542543
}
543544
'?' | '#' => {
@@ -795,6 +796,14 @@ mod tests {
795796
assert url.path == ~"/";
796797
}
797798

799+
#[test]
800+
fn test_url_with_underscores() {
801+
let urlstr = ~"http://dotcom.com/file_name.html";
802+
let url = from_str(urlstr).get();
803+
#debug("url: %?", url);
804+
assert url.path == ~"/file_name.html";
805+
}
806+
798807
#[test]
799808
fn test_no_scheme() {
800809
assert result::is_err(get_scheme(~"noschemehere.html"));

0 commit comments

Comments
 (0)