Skip to content

Commit e6ec7a9

Browse files
committed
---
yaml --- r: 20899 b: refs/heads/snap-stage3 c: d3a9bb1 h: refs/heads/master i: 20897: 2f24704 20895: 34e39da v: v3
1 parent c2b39d9 commit e6ec7a9

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-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: 74370042aa698c0360aadf356ccc4305cc2c0cd2
4+
refs/heads/snap-stage3: d3a9bb1bd4a1d510bbaca2ab1121e4c85a239247
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: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ fn get_path(rawurl: ~str, authority : bool) ->
538538
match c {
539539
'A' to 'Z' | 'a' to 'z' | '0' to '9' | '&' |'\'' | '(' | ')' | '.'
540540
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
541-
| '_' => {
541+
| '_' | '-' => {
542542
again;
543543
}
544544
'?' | '#' => {
@@ -804,6 +804,14 @@ mod tests {
804804
assert url.path == ~"/file_name.html";
805805
}
806806

807+
#[test]
808+
fn test_url_with_dashes() {
809+
let urlstr = ~"http://dotcom.com/file-name.html";
810+
let url = from_str(urlstr).get();
811+
#debug("url: %?", url);
812+
assert url.path == ~"/file-name.html";
813+
}
814+
807815
#[test]
808816
fn test_no_scheme() {
809817
assert result::is_err(get_scheme(~"noschemehere.html"));

0 commit comments

Comments
 (0)