Commit 12c280b 1 parent f7cb8b7 commit 12c280b Copy full SHA for 12c280b
File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -411,12 +411,14 @@ impl V2GetContext {
411
411
ohttp_relay : Url ,
412
412
) -> Result < ( Request , ohttp:: ClientResponse ) , CreateRequestError > {
413
413
use crate :: uri:: UrlExt ;
414
- let mut url = self . endpoint . clone ( ) ;
414
+ let base_url = self . endpoint . clone ( ) ;
415
415
416
416
// TODO unify with receiver's fn subdir_path_from_pubkey
417
417
let hash = sha256:: Hash :: hash ( & self . hpke_ctx . reply_pair . public_key ( ) . to_compressed_bytes ( ) ) ;
418
418
let subdir: ShortId = hash. into ( ) ;
419
- url. set_path ( & subdir. to_string ( ) ) ;
419
+ let url = base_url. join ( & subdir. to_string ( ) )
420
+ . map_err ( |e| InternalCreateRequestError :: Url ( e) ) ?;
421
+
420
422
let body = encrypt_message_a (
421
423
Vec :: new ( ) ,
422
424
& self . hpke_ctx . reply_pair . public_key ( ) . clone ( ) ,
You can’t perform that action at this time.
0 commit comments