cesanta / mongoose

Embedded Web Server
https://mongoose.ws
Other
11.16k stars 2.73k forks source link

Custom http websocket upgrade request #2859

Closed FabianTerhorst closed 3 months ago

FabianTerhorst commented 3 months ago

Having the possibility to dynamically set the host header field inside the http upgrade to websocket request is required for me under specific circumstances where the url contains a ip address instead of a domain. To have a correctly working behavior the host still needs to be set to the domain name in this case. But mongoose does not allow specifying the host independently inside the websocket upgrade: https://github.com/cesanta/mongoose/blob/d763fce8ed584530ebd1d4c15f69df05a7164379/src/ws.c#L247 Making it possible to build the websocket upgrade http request more dynamically while not having to reimplement the ´mg_ws_cb´ would be appreciated.

Environment

scaprile commented 3 months ago

This is not a Mongoose issue. It is something you request. Mongoose 7.1.4 does not exist. If you need a specific change, please clearly explain your use case and why it is needed. Clearly describe the whole scenario, what is done, what is not, what is needed, and why. If you are a paying customer, please contact Support as per your contract.