Sha256: d12f70daaf2b9b7908702aae21cb60db26c861732e53f4e3ba6562926d26431c
Contents?: true
Size: 719 Bytes
Versions: 21
Compression:
Stored size: 719 Bytes
Contents
package http_parser.lolevel; import java.nio.*; import java.util.*; import http_parser.ParserType; import static http_parser.lolevel.Util.*; public class Upgrade { static final String upgrade = "GET /demo HTTP/1.1\r\n" + "Connection: Upgrade\r\n" + "Upgrade: WebSocket\r\n\r\n" + "third key data"; static void test () { p(Upgrade.class); HTTPParser parser = new HTTPParser(ParserType.HTTP_REQUEST); ByteBuffer buf = buffer(upgrade); int read = parser.execute(Util.SETTINGS_NULL, buf); check (63 == read); String s = str(buf); check ("third key data".equals(str(buf))); } }
Version data entries
21 entries across 21 versions & 7 rubygems