maddsua / lambda

HTTP and Websocket server library
MIT License
3 stars 0 forks source link

Request event context #170

Closed maddsua closed 7 months ago

maddsua commented 7 months ago

It makes perfect sense to make a structure to hold both request id and content encoding just so it can be passed around easily and there wouldn't be a need to retrieve content encoding from transport context

maddsua commented 7 months ago

But then.. why? Payload compression works the same way in both http1 and http2 (and we are not even talking about http3, just nope) - there's no reason to take that encoding mode variable out of transport context. Would reopen this as soon as an actual need is raised but for now the only filed here would be request id and... why bother? More than that, as request id is a number, in case I need to find some data linked with a request I could just use it to retrieve an element from a hashmap or something. Literally no need to over complicate shit right now.