h2lean 0.19.1 → 0.19.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/headers.js +1 -18
- package/lib/hpack.js +0 -5
- package/package.json +1 -1
package/lib/headers.js
CHANGED
|
@@ -738,23 +738,6 @@ function writePrepared(prep, session, dst, off) {
|
|
|
738
738
|
return off + end;
|
|
739
739
|
}
|
|
740
740
|
|
|
741
|
-
// The HPACK block for a PUSH_PROMISE payload: request-style pseudo-headers, no date,
|
|
742
|
-
// no status default, no cache (a promise is one-shot). The encoder is the session's,
|
|
743
|
-
// so the block shares the connection's dynamic table with every other outbound block.
|
|
744
|
-
// Returns a view into the shared scratch, valid until the next encode call -- the
|
|
745
|
-
// caller (session.sendPushPromise) copies it into the frame immediately.
|
|
746
|
-
function pushBlock(headers, session) {
|
|
747
|
-
const enc = session._encoder;
|
|
748
|
-
const update = enc.takeSizeUpdate();
|
|
749
|
-
const parsed = parse(headers, { request: true, strict: session._strictSingle });
|
|
750
|
-
const at = update === null ? 0 : update.length;
|
|
751
|
-
const end = encodeAt(parsed, enc, at);
|
|
752
|
-
if (at !== 0) {
|
|
753
|
-
copyInto(scratch, 0, update, 0, update.length);
|
|
754
|
-
}
|
|
755
|
-
return scratch.subarray(0, end);
|
|
756
|
-
}
|
|
757
|
-
|
|
758
741
|
// The maps node hands back as `stream.sentHeaders` and `req.sentHeaders`: the message that
|
|
759
742
|
// went out, not the object the application passed in. node copies into a null-prototype map
|
|
760
743
|
// and fills the pseudo-headers itself (prepareResponseHeadersObject, internal/http2/core.js
|
|
@@ -890,7 +873,7 @@ function requestView(src, scheme, authority) {
|
|
|
890
873
|
return view;
|
|
891
874
|
}
|
|
892
875
|
|
|
893
|
-
module.exports = { block,
|
|
876
|
+
module.exports = { block, encode, parse, prepare, writePrepared, capOf, boundOf,
|
|
894
877
|
nullProto, isFieldName, trimName, lowerName,
|
|
895
878
|
nameCacheSize, hasBadValue, neverNames, CONNECTION_SPECIFIC, KSensitiveHeaders, SINGLE_VALUE_FIELDS,
|
|
896
879
|
sent, responseView, requestView };
|
package/lib/hpack.js
CHANGED
|
@@ -1431,11 +1431,6 @@ class Encoder {
|
|
|
1431
1431
|
}
|
|
1432
1432
|
|
|
1433
1433
|
|
|
1434
|
-
indexed(index) {
|
|
1435
|
-
const b = Buffer.allocUnsafe(4);
|
|
1436
|
-
return b.subarray(0, writeInt(b, 0, index, 7, 0x80));
|
|
1437
|
-
}
|
|
1438
|
-
|
|
1439
1434
|
// An indexed reference is one prefixed integer and nothing else. Writing it into
|
|
1440
1435
|
// the destination removes both the 4-octet Buffer and the memcpy from the cached
|
|
1441
1436
|
// bytes -- and the cache entry itself, which cannot survive an epoch change while
|
package/package.json
CHANGED