LemmyNet/activitypub-federation-rust

Compress body of outgoing post requests

Closed this issue · 1 comments

This will likely improve performance

let request_builder = client
.post(task.inbox.to_string())
.timeout(timeout)
.headers(generate_request_headers(&task.inbox));
let request = sign_request(
request_builder,
task.actor_id,
task.activity,
task.private_key,
task.http_signature_compat,
)
.await?;
let response = client.execute(request).await;

As someone else mentioned, this is actually not a good idea because we have no way to know if the receiving side supports compression in case of POST requests.