Roxen.git / server / etc / test / tests / http / RoxenTest_websockets_2.pike

version» Context lines:

Roxen.git/server/etc/test/tests/http/RoxenTest_websockets_2.pike:50:      void run_tests(Configuration c)   {    foreach(c->query("URLs"), string url) {    if (!has_prefix(url, "http://") && !has_prefix(url, "https://")) {    continue;    }    url = (url/"#")[0];       Standards.URI uri = Standards.URI("websocket_example/", url); +  if (uri->host == "*") uri->host = "127.0.0.1";       Concurrent.Promise p = Concurrent.Promise();    Connection ws = Connection(p);       array expect = ({ -1 });    for (int i = 0; i < 5; i++) {    ws->tosend += ({ sprintf("%d %d", 17, i+1) });    expect += ({ sprintf("%d %d", i+1, 17) });    }    expect += ({ Protocols.WebSocket.CLOSE_NORMAL });