File tree 3 files changed +15
-3
lines changed
3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ jobs:
261
261
command : rustdoc
262
262
args : --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
263
263
264
- doc :
264
+ check-external-types :
265
265
name : Check exposed types
266
266
needs : [style, test]
267
267
runs-on : ubuntu-latest
Original file line number Diff line number Diff line change @@ -46,7 +46,13 @@ async fn fetch_url(url: hyper::Uri) -> Result<()> {
46
46
}
47
47
} ) ;
48
48
49
- let req = Request :: builder ( ) . uri ( url) . body ( Body :: empty ( ) ) . unwrap ( ) ;
49
+ let authority = url. authority ( ) . unwrap ( ) . clone ( ) ;
50
+
51
+ let req = Request :: builder ( )
52
+ . uri ( url)
53
+ . header ( hyper:: header:: HOST , authority. as_str ( ) )
54
+ . body ( Body :: empty ( ) ) ?;
55
+
50
56
let mut res = sender. send_request ( req) . await ?;
51
57
52
58
println ! ( "Response: {}" , res. status( ) ) ;
Original file line number Diff line number Diff line change @@ -36,8 +36,14 @@ async fn fetch_json(url: hyper::Uri) -> Result<Vec<User>> {
36
36
}
37
37
} ) ;
38
38
39
+ let authority = url. authority ( ) . unwrap ( ) . clone ( ) ;
40
+
39
41
// Fetch the url...
40
- let req = Request :: builder ( ) . uri ( url) . body ( Body :: empty ( ) ) . unwrap ( ) ;
42
+ let req = Request :: builder ( )
43
+ . uri ( url)
44
+ . header ( hyper:: header:: HOST , authority. as_str ( ) )
45
+ . body ( Body :: empty ( ) ) ?;
46
+
41
47
let res = sender. send_request ( req) . await ?;
42
48
43
49
// asynchronously aggregate the chunks of the body
You can’t perform that action at this time.
0 commit comments