Skip to content

Commit 2e82b1e

Browse files
committed
---
yaml --- r: 31663 b: refs/heads/dist-snap c: 1e3143b h: refs/heads/master i: 31661: 5fb2491 31659: 41295f7 31655: fa53e97 31647: 09d7ad2 v: v3
1 parent 96975b0 commit 2e82b1e

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
@@ -7,6 +7,6 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: d0c6ce338884ee21843f4b40bf6bf18d222ce5df
99
refs/heads/incoming: d9317a174e434d4c99fc1a37fd7dc0d2f5328d37
10-
refs/heads/dist-snap: 03330baf9ca15d88e58753167b1eb40ca03cba78
10+
refs/heads/dist-snap: 1e3143b34e66ca5157b03d3658d64d7c01563186
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503

branches/dist-snap/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)