… | |
… | |
41 | $ns->inbuf_append ($buf); |
41 | $ns->inbuf_append ($buf); |
42 | |
42 | |
43 | } elsif ($buf =~ /^GET / && defined &ext::http::server) { # http or websocket |
43 | } elsif ($buf =~ /^GET / && defined &ext::http::server) { # http or websocket |
44 | undef $w; |
44 | undef $w; |
45 | |
45 | |
46 | &ext::http::server ($fh, $buf); |
46 | &ext::http::server ($id, $fh, $buf); |
47 | |
47 | |
48 | } elsif (length $buf >= $MAX_DETECT) { # unable to detect protocol |
48 | } elsif (length $buf >= $MAX_DETECT) { # unable to detect protocol |
49 | undef $w; |
49 | undef $w; |
50 | |
50 | |
51 | cf::info "$id: protocol detection error\n"; |
51 | cf::info "$id: protocol detection error\n"; |