feat: add compression negotiation for sent messages #91

Merged
prologic merged 2 commits from use-compression into master 6 months ago
xuu commented 6 months ago
Owner

feat: add compression negotiation for sent messages
fix: unix homedir handling

the service will negotiate a compression algo for sending messages
when a user chats someone during the auto discovery, the service returns an Accept-Encoding: br, gzip, deflate

the client saves that response and so when it makes POSTs of messages adds the best Content-Encoding and compresses the message

example:

>> GET /.well-known/salty/c765c69040d98f3af2181237f47ec01398d80f8ab2690fe929e4311ab05dec01.json

<< Accept-Encoding: br, gzip, deflate
<< 
<< {"endpoint":"https://salty.home.arpa/inbox/01FZBR8Y2E6TH949JA3925WF71","key":"kex1wurry09ftqjuxgjl0jxmqypv4axqvzqljkgeadxjcpwtfuhcedcslck52d"}

>> POST /inbox/01FZBR8Y2E6TH949JA3925WF71
>> Content-Encoding: br
>> 
>> [Brotli Compressed data]

this PR depends on prologic/msgbus#24

feat: add compression negotiation for sent messages fix: unix homedir handling the service will negotiate a compression algo for sending messages when a user chats someone during the auto discovery, the service returns an `Accept-Encoding: br, gzip, deflate` the client saves that response and so when it makes POSTs of messages adds the best `Content-Encoding` and compresses the message example: ``` >> GET /.well-known/salty/c765c69040d98f3af2181237f47ec01398d80f8ab2690fe929e4311ab05dec01.json << Accept-Encoding: br, gzip, deflate << << {"endpoint":"https://salty.home.arpa/inbox/01FZBR8Y2E6TH949JA3925WF71","key":"kex1wurry09ftqjuxgjl0jxmqypv4axqvzqljkgeadxjcpwtfuhcedcslck52d"} >> POST /inbox/01FZBR8Y2E6TH949JA3925WF71 >> Content-Encoding: br >> >> [Brotli Compressed data] ``` this PR depends on https://git.mills.io/prologic/msgbus/pulls/24
xuu added 1 commit 6 months ago
b8a31caee0
feat: add compression for sent messages
xuu added 1 commit 6 months ago
8ab3164fe3
build: update msgbus dep
xuu changed title from WIP: feat: add compression negotiation for sent messages to feat: add compression negotiation for sent messages 6 months ago
prologic force-pushed use-compression from 8ab3164fe3 to a5f4f779f4 6 months ago
prologic merged commit 754fcc7323 into master 6 months ago
prologic deleted branch use-compression 6 months ago
continuous-integration/drone/pr Build is passing
The pull request has been merged as 754fcc7323.
Sign in to join this conversation.
Loading…
There is no content yet.