File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 74370042aa698c0360aadf356ccc4305cc2c0cd2
2
+ refs/heads/master: d3a9bb1bd4a1d510bbaca2ab1121e4c85a239247
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: cd6f24f9d14ac90d167386a56e7a6ac1f0318195
5
5
refs/heads/try: ffbe0e0e00374358b789b0037bcb3a577cd218be
Original file line number Diff line number Diff line change @@ -538,7 +538,7 @@ fn get_path(rawurl: ~str, authority : bool) ->
538
538
match c {
539
539
'A' to 'Z' | 'a' to 'z' | '0' to '9' | '&' |'\'' | '(' | ')' | '.'
540
540
| '@' | ':' | '%' | '/' | '+' | '!' | '*' | ',' | ';' | '='
541
- | '_' => {
541
+ | '_' | '-' => {
542
542
again;
543
543
}
544
544
'?' | '#' => {
@@ -804,6 +804,14 @@ mod tests {
804
804
assert url. path == ~"/file_name. html ";
805
805
}
806
806
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
+
807
815
#[ test]
808
816
fn test_no_scheme ( ) {
809
817
assert result:: is_err ( get_scheme ( ~"noschemehere. html ") ) ;
You can’t perform that action at this time.
0 commit comments