Created
March 1, 2019 01:37
-
-
Save danopia/dd2d5ed4ddec3467dd5f0b92d46b42cd to your computer and use it in GitHub Desktop.
openbsd 6.5-beta relayd websocket patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -u -p -r1.71 relay_http.c | |
--- relay_http.c 6 Aug 2018 17:31:31 -0000 1.71 | |
+++ relay_http.c 1 Mar 2019 01:33:35 -0000 | |
@@ -276,6 +276,13 @@ relay_read_http(struct bufferevent *bev, | |
DPRINTF("http_version %s http_rescode %s " | |
"http_resmesg %s", desc->http_version, | |
desc->http_rescode, desc->http_resmesg); | |
+ | |
+ // HTTP 101 Switching Protocols | |
+ if (desc->http_status == 101) { | |
+ cre->dst->toread = TOREAD_UNLIMITED; | |
+ cre->dst->bev->readcb = relay_read; | |
+ } | |
+ | |
goto lookup; | |
} else if (cre->line == 1 && cre->dir == RELAY_DIR_REQUEST) { | |
if ((desc->http_method = relay_httpmethod_byname(key)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment