File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -943,6 +943,8 @@ fn title_case(dst: &mut Vec<u8>, name: &[u8]) {
943943 if let Some ( c) = iter. next ( ) {
944944 if * c >= b'a' && * c <= b'z' {
945945 dst. push ( * c ^ b' ' ) ;
946+ } else {
947+ dst. push ( * c) ;
946948 }
947949 }
948950
@@ -953,6 +955,8 @@ fn title_case(dst: &mut Vec<u8>, name: &[u8]) {
953955 if let Some ( c) = iter. next ( ) {
954956 if * c >= b'a' && * c <= b'z' {
955957 dst. push ( * c ^ b' ' ) ;
958+ } else {
959+ dst. push ( * c) ;
956960 }
957961 }
958962 }
@@ -1371,6 +1375,7 @@ mod tests {
13711375 let mut head = MessageHead :: default ( ) ;
13721376 head. headers . insert ( "content-length" , HeaderValue :: from_static ( "10" ) ) ;
13731377 head. headers . insert ( "content-type" , HeaderValue :: from_static ( "application/json" ) ) ;
1378+ head. headers . insert ( "*-*" , HeaderValue :: from_static ( "o_o" ) ) ;
13741379
13751380 let mut vec = Vec :: new ( ) ;
13761381 Client :: encode ( Encode {
@@ -1381,7 +1386,7 @@ mod tests {
13811386 title_case_headers : true ,
13821387 } , & mut vec) . unwrap ( ) ;
13831388
1384- assert_eq ! ( vec, b"GET / HTTP/1.1\r \n Content-Length: 10\r \n Content-Type: application/json\r \n \r \n " . to_vec( ) ) ;
1389+ assert_eq ! ( vec, b"GET / HTTP/1.1\r \n Content-Length: 10\r \n Content-Type: application/json\r \n *-*: o_o \r \n \r \n " . to_vec( ) ) ;
13851390 }
13861391
13871392 #[ test]
You can’t perform that action at this time.
0 commit comments