File tree Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Expand file tree Collapse file tree 3 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -261,7 +261,7 @@ jobs:
261261 command : rustdoc
262262 args : --features full,ffi -- --cfg docsrs --cfg hyper_unstable_ffi -D broken-intra-doc-links
263263
264- doc :
264+ check-external-types :
265265 name : Check exposed types
266266 needs : [style, test]
267267 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<()> {
4646 }
4747 } ) ;
4848
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+
5056 let mut res = sender. send_request ( req) . await ?;
5157
5258 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>> {
3636 }
3737 } ) ;
3838
39+ let authority = url. authority ( ) . unwrap ( ) . clone ( ) ;
40+
3941 // 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+
4147 let res = sender. send_request ( req) . await ?;
4248
4349 // asynchronously aggregate the chunks of the body
You can’t perform that action at this time.
0 commit comments