Commit 36f9b8c7 authored by CompileNix's avatar CompileNix

Initial

parents
*.log
node_modules
```
443164: HTTP2_SESSION
localhost:8020 (DIRECT)
Start Time: 2015-12-21 22:33:02.968
t=37072 [st= 0] +HTTP2_SESSION [dt=?]
--> host = "localhost:8020"
--> proxy = "DIRECT"
t=37072 [st= 0] HTTP2_SESSION_INITIALIZED
--> protocol = "h2"
--> source_dependency = 443163 (SOCKET)
t=37072 [st= 0] HTTP2_SESSION_SEND_SETTINGS
--> settings = ["[id:3 flags:0 value:1000]","[id:4 flags:0 value:6291456]"]
t=37072 [st= 0] HTTP2_STREAM_UPDATE_RECV_WINDOW
--> delta = 15663105
--> window_size = 15728640
t=37072 [st= 0] HTTP2_SESSION_SENT_WINDOW_UPDATE_FRAME
--> delta = 15663105
--> stream_id = 0
t=37073 [st= 1] HTTP2_SESSION_SEND_HEADERS
--> fin = true
--> :method: GET
:authority: localhost:8020
:scheme: https
:path: /
cache-control: max-age=0
accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
upgrade-insecure-requests: 1
user-agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36
accept-encoding: gzip, deflate, sdch
accept-language: en,de;q=0.8,en-US;q=0.6
cookie: [61 bytes were stripped]
--> priority = 0
--> stream_id = 1
--> unidirectional = false
t=37076 [st= 4] HTTP2_SESSION_RECV_SETTINGS
--> clear_persisted = false
--> host = "localhost:8020"
t=37129 [st= 57] HTTP2_SESSION_RECV_PUSH_PROMISE
--> :method: GET
:scheme: https
:authority: localhost:8020
:path: /main.js
--> id = 1
--> promised_stream_id = 2
t=37129 [st= 57] HTTP2_SESSION_RECV_HEADERS
--> fin = false
--> :status: 200
content-type: text/html
date: Mon, 21 Dec 2015 21:34:59 GMT
--> stream_id = 1
t=37129 [st= 57] HTTP2_SESSION_RECV_DATA
--> fin = false
--> size = 53
--> stream_id = 1
t=37129 [st= 57] HTTP2_SESSION_UPDATE_RECV_WINDOW
--> delta = -53
--> window_size = 15728587
t=37129 [st= 57] HTTP2_SESSION_RECV_DATA
--> fin = true
--> size = 0
--> stream_id = 1
t=37129 [st= 57] HTTP2_STREAM_UPDATE_RECV_WINDOW
--> delta = 53
--> window_size = 15728640
t=37129 [st= 57] HTTP2_SESSION_RECV_HEADERS
--> fin = false
--> :status: 200
content-type: application/javascript
date: Mon, 21 Dec 2015 21:34:59 GMT
--> stream_id = 2
t=37129 [st= 57] HTTP2_SESSION_RECV_DATA
--> fin = false
--> size = 120
--> stream_id = 2
t=37129 [st= 57] HTTP2_SESSION_UPDATE_RECV_WINDOW
--> delta = -120
--> window_size = 15728520
t=37129 [st= 57] HTTP2_SESSION_RECV_DATA
--> fin = true
--> size = 0
--> stream_id = 2
t=37201 [st=129] HTTP2_STREAM_ADOPTED_PUSH_STREAM
--> stream_id = 2
--> url = "https://localhost:8020/main.js"
t=37201 [st=129] HTTP2_STREAM_UPDATE_RECV_WINDOW
--> delta = 120
--> window_size = 15728640
\ No newline at end of file
-----BEGIN CERTIFICATE-----
MIIFqjCCA5KgAwIBAgIBFjANBgkqhkiG9w0BAQ0FADCBijELMAkGA1UEBhMCREUx
EDAOBgNVBAgMB0hhbWJ1cmcxEDAOBgNVBAcMB0hhbWJ1cmcxEzARBgNVBAoMCkNv
bXBpbGVuaXgxEzARBgNVBAMMCkNvbXBpbGVuaXgxLTArBgkqhkiG9w0BCQEWHkNv
bXBpbGVuaXhAZGhhcm1hLm5vLXRydXN0Lm9yZzAeFw0xNTEyMjEyMTI4MDBaFw0y
NTEyMTgyMTI4MDBaMCkxEzARBgNVBAoMCkNvbXBpbGVuaXgxEjAQBgNVBAMMCWxv
Y2FsaG9zdDCCAiIwDQYJKoZIhvcNAQEBBQADggIPADCCAgoCggIBANSL/poXHwQI
3htrWhLdk0kyqtoIUPCwIzC5nXvWpMH6KSkhEfZR/sZtKTo3HNEhjXeJkWzDdFQc
+6IHzuC3K5joZwEEsICg9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791vtT/xOJcKQKCAQEAj4Y+mumbaCqs+HJrPaoKZwZ1
Y1bkCtEorsp0As1idrbG7+TrGGg/l+qM0Eo1aV6IPA97tJtGCWTHzXjpTZecK9tF
CICJpECtZjLsr4jmTejeEs1nqetv2GfjCtCOspyP/HeTqkwuQNeFmOP7KRxHisBJ
6+3F23JMzr5Xwsil1//Kj4AZDVjnLq0jchyY+ImnqMMfyWmdqaKplhQbDY6rFeMx
x5BYrrU2lZmRmMfuydGGYYXWPp4h339jQgKENEEldgtuRS0as49T0kpGCIYZKckx
JDzkTRHwh4PWCJ1XHuyOUkU52dELq/OLAc4n1QlqpAPenWV/z33/bzZEHp+meQ==
-----END RSA PRIVATE KEY-----
\ No newline at end of file
{
"name": "http2_test",
"version": "0.0.2",
"description": "A small node app which tests the \"server push\" feature of http/2",
"main": "server.js",
"author": "Compilenix <compilenix@compilenix.org>",
"license": "MIT",
"dependencies": {
"http2": "*"
}
}
"use strict";
var h2 = require('http2');
var fs = require('fs');
var path = require('path');
var options = {
key: fs.readFileSync('./localhost.key'),
cert: fs.readFileSync('./localhost.crt')
};
var port = process.env.port || 8020;
var listenAddress = process.env.address || "0.0.0.0";
function OnRequest(req, res) {
// ignore /favicon.ico with 404
if (req.url == '/favicon.ico') { res.writeHead(404); res.end("404 Not Found\n"); return; }
console.log("request: http/" + req.httpVersion + " " + req.method + " " + req.url);
if (res.push && req.url === '/' && req.method == 'GET') {
console.log("push: sending main.js");
// tell which file we are about to push
var push = res.push('/main.js');
console.log("push: write header");
push.writeHead(200, {'content-type': 'application/javascript'});
// send the content
console.log("push: write body");
//fs.createReadStream(path.join(__dirname, '/main.js')).pipe(push);
push.end('document.body.appendChild(document.createElement("P").appendChild(document.createTextNode("hello from push stream!")));\n');
console.log("push: main.js done");
}
console.log("response: write header");
res.writeHead(200, {"Content-Type": "text/html"});
console.log("response: write body");
res.end('<p>Hello World!</p>\n<script src="/main.js"></script>\n');
console.log("response: done\n");
}
h2.createServer(options, OnRequest).listen(port, listenAddress);
console.log("server started; listening on " + listenAddress + ":" + port + "\n");
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment