-
-
Notifications
You must be signed in to change notification settings - Fork 845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Porting to OpenBSD : length mismatch and invalid return #43
Comments
ttyd is not tested on OpenBSD yet, PRs are welcomed. |
Merged #44. I don't have OpenBSD environment right now, will check the issue you reported later. |
Reproduced this issue on OpenBSD 6.0 last night. However, I can't reproduce it on macOs 10.12.3, this may be an issue of the |
Following documentation it s important to not try to reuse when lws_serve_http_file return 0 nor to try to reuse the socket. This fix the issue on openbsd 6.0 ( my current test is with upgraded libwebsocket 2.0.3 instead of 2.0.2 but it shouldnt matter
I tested the sofware with the proposed file change following |
Following documentation it s important to not try to reuse when lws_serve_http_file return 0 nor to try to reuse the socket. This fix the issue on openbsd 6.0 ( my current test is with upgraded libwebsocket 2.0.3 instead of 2.0.2 but it shouldnt matter
Thanks @dohnuts ! Works great 👍 I've applied your patch with some modifications. |
Hello,
After fixing compilation ( just a few defines for STAILQ and c99 )
i am trying to run the daemon.
It stays in this state and does not provide content
i ran it like this :
ttyd -O --debug 7 --index /usr/ports/pobj/ttyd-1.3.0/ttyd-1.3.0/html/index.html /bin/ksh
When the daemon serve small file it s okay, but it looks like the c code forgot to write when
the socket is ready.
curl http://127.0.0.1/ show the html package file is cut :
break;case"m":p="0m";break;default:this._terminal.error("Unknown DCS Pt: %s.",p),p=""}this._terminal.send(s.C0.ESC+"P"+ +f+"$r"+p+s.C0.ESC+"\\");break;case"+p":break;case"+q":p=this._terminal.currentParam,f=!1,this._terminal.send(s.C0.ESC+"P"+ +f+"+r"+p+s.C0.ESC+"\\");break;default:this._terminal.error("Unknown DCS prefix: %s.",this._terminal.prefix)}this._terminal.currentParam=0,
By using nginx/1.10.1 as a proxy see https://www.nginx.com/blog/websocket-nginx/
i can load the all index.html but other error occurs :
WebSocket connection to 'ws://my.com/index.htmlws' failed: Error during WebSocket handshake: Unexpected response code: 502
Because the full referrer of my request is used ( i called with index.html )
By playing arounf with nginx i got something working but the issues should be fixed.
The text was updated successfully, but these errors were encountered: