I seem to have some kind of issue with ssl_shutdown, I wrote a packet-level proxy in c++ but I still can't figure out the correct incantation to shutdown on both sides correctly. The Python SSL socket shutdown() function doesn't seem to return anything, so we can't tell if it's finished yet.
I wrote this as an alternative to socketserver.py from the standard library, as I didn't like all of the customization points and indirection.
Also one thing to note is that doing .recv(1024) makes it so that the first line of your http request must be less than 1024 bytes long, which (if you have a lot of query parameters, like I do on some requests) might require you to do some slightly stranger loop shenanigans like I do. It was tricky to figure out, and I don't think it's a completely generalizable solution, but I heavily recommend something like it for anyone dealing with the same problem.
server lib: https://github.com/kasrasadeghi/pipeline-js/blob/main/kazhtt...
Used here: https://github.com/kasrasadeghi/pipeline-js/blob/main/simple...
I seem to have some kind of issue with ssl_shutdown, I wrote a packet-level proxy in c++ but I still can't figure out the correct incantation to shutdown on both sides correctly. The Python SSL socket shutdown() function doesn't seem to return anything, so we can't tell if it's finished yet.
I wrote this as an alternative to socketserver.py from the standard library, as I didn't like all of the customization points and indirection.
Also one thing to note is that doing .recv(1024) makes it so that the first line of your http request must be less than 1024 bytes long, which (if you have a lot of query parameters, like I do on some requests) might require you to do some slightly stranger loop shenanigans like I do. It was tricky to figure out, and I don't think it's a completely generalizable solution, but I heavily recommend something like it for anyone dealing with the same problem.