walkor / walkor/workerman

Sec-WebSocket-Accept not found.

Open
#847 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
PHP
Stars
11.6k
Forks
2.2k
Avg merge
11h 30m
Merged PRs (30d)
3

Description

```
onWorkerStart = function () {
// Websocket protocol for client.
$ws_connection = new AsyncTcpConnection('ws://ws.postman-echo.com/socketio');
$ws_connection->transport = 'ssl';

$ws_connection->onConnect = function ($connection) {
$connection->send('Hi');
};

$ws_connection->onMessage = function ($connection, $data) {
echo "Recv: $data\n";
};
$ws_connection->onError = function ($connection, $code, $msg) {
echo "Error: $msg\n";
};
$ws_connection->onClose = function ($connection) {
echo "Connection closed\n";
};
$ws_connection->connect();
};

Worker::runAll();
```
Response:
```
$ php workerman.php
----------------------- WORKERMAN -----------------------------
Workerman version:4.1.4 PHP version:8.1.6
------------------------ WORKERS -------------------------------
worker listen processes status
none none 1 [ok]
Sec-WebSocket-Accept not found. Header:
HTTP/1.1 403 Forbidden
Date: Thu, 10 Nov 2022 15:06:16 GMT
Content-Type: text/html
Content-Length: 146
Connection: keep-alive
Server: tv
Connection closed
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Run the provided workerman.php example and inspect AsyncTcpConnection's WebSocket handshake against ws.postman-echo.com/socketio. Determine whether the 403 is an endpoint rejection or a client parsing issue; done is a reproducible diagnosis and a narrowly scoped fix or documentation update with a verified connection.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.