File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1
- // Copyright 2012 The Rust Project Developers. See the COPYRIGHT
1
+ // Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
2
2
// file at the top-level directory of this distribution and at
3
3
// http://rust-lang.org/COPYRIGHT.
4
4
//
@@ -581,7 +581,7 @@ fn get_path(rawurl: &str, authority: bool) ->
581
581
match c {
582
582
'A' .. 'Z' | 'a' .. 'z' | '0' .. '9' | '&' |'\'' | '(' | ')' | '.'
583
583
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
584
- | '_' | '-' => {
584
+ | '_' | '-' | '~' => {
585
585
continue ;
586
586
}
587
587
'?' | '#' => {
@@ -824,15 +824,15 @@ mod tests {
824
824
825
825
#[test]
826
826
fn test_url_parse() {
827
- let url = ~" http: //user:pass@rust-lang.org:8080/doc?s=v#something";
827
+ let url = ~" http: //user:pass@rust-lang.org:8080/doc/~u ?s=v#something";
828
828
829
829
let up = from_str( url) ;
830
830
let u = up. unwrap( ) ;
831
831
assert_eq!( & u. scheme, & ~"http");
832
832
assert_eq!(&u.user, &Some(UserInfo::new(~" user", Some(~" pass"))));
833
833
assert_eq!(&u.host, &~" rust-lang. org");
834
834
assert_eq!(&u.port, &Some(~" 8080 "));
835
- assert_eq!(&u.path, &~" /doc");
835
+ assert_eq!(&u.path, &~" /doc/~u ");
836
836
assert_eq!(&u.query, &~[(~" s", ~" v")]);
837
837
assert_eq!(&u.fragment, &Some(~" something"));
838
838
}
You can’t perform that action at this time.
0 commit comments