lpicanco / knostr

Nostr Relay Implementation on Kotlin
https://knostr.neutrine.com
MIT License
28 stars 1 forks source link

server_no_context_takeover #7

Open barkyq opened 1 year ago

barkyq commented 1 year ago

If I send the following header in the websocket handshake:

Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover

The returned handshake response says the server does not want to use permessage-deflate.

But if I just send:

Sec-WebSocket-Extensions: permessage-deflate

The returned handshake response says the server does want to use permessage-deflate.

From: https://www.rfc-editor.org/rfc/rfc7692, "It is RECOMMENDED that a server supports the server_no_context_takeover extension parameter in an extension negotiation offer."

barkyq commented 1 year ago

Kudos for supporting compression. Most relays (e.g., nostream, nostr-rs-relay) don't. The only other one AFAICT is strfry

barkyq commented 1 year ago

not really an issue either, it might be intentional. the compression is much better if the server can do context_takeover in any case.

lpicanco commented 1 year ago

Thanks @barkyq, I will take a look on it.