Open wedobetter opened 2 months ago
If you use "Res.Write_Header ()" you are like overwriting the header, so it becomes 2 headers, the other header is run using uwebsocket in the source native.py file that connects uwebsocket
This is a issue with uWS we will move to using a customized version, so we can set the Server header as a server option.
@cirospaciari why not to simply modify this macro?
#ifndef UWS_HTTPRESPONSE_NO_WRITEMARK
if (!Super::getLoopData()->noMark) {
/* We only expose major version */
writeHeader("uWebSockets", "20");
}
#endif
in this file in https://github.com/uNetworking/uWebSockets/blob/master/src/HttpResponse.h
wow, that's amazing bro, you must check the uwebsockets code one by one
This is pretty easy to fix, before sending the body (write/send/end) we need to check if we already sent the Server header, if not will use the default, will add a option to hide this server header if someone just dont wanna to see "uWebSockets" ou "socketify" on it.
I have tried to overwrite it:
and I ended up with this:
curl -i -I http://127.0.0.1:9999/health