mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 993037 (part 1) - http/2 draft 11 client implementation. r=mcmanus
This commit is contained in:
parent
c6dab9a319
commit
0f06849f17
@ -59,11 +59,12 @@ InitializeStaticHeaders()
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":scheme"), NS_LITERAL_CSTRING("http"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":scheme"), NS_LITERAL_CSTRING("https"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("200"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("500"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("404"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("403"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("204"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("206"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("304"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("400"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("401"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("404"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING(":status"), NS_LITERAL_CSTRING("500"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING("accept-charset"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING("accept-encoding"));
|
||||
AddStaticElement(NS_LITERAL_CSTRING("accept-language"));
|
||||
@ -298,9 +299,13 @@ Http2Decompressor::DecodeHeaderBlock(const uint8_t *data, uint32_t datalen,
|
||||
if (mData[mOffset] & 0x80) {
|
||||
rv = DoIndexed();
|
||||
} else if (mData[mOffset] & 0x40) {
|
||||
rv = DoLiteralWithoutIndex();
|
||||
} else {
|
||||
rv = DoLiteralWithIncremental();
|
||||
} else if (mData[mOffset] & 0x20) {
|
||||
rv = DoContextUpdate();
|
||||
} else if (mData[mOffset] & 0x10) {
|
||||
rv = DoLiteralNeverIndexed();
|
||||
} else {
|
||||
rv = DoLiteralWithoutIndex();
|
||||
}
|
||||
}
|
||||
|
||||
@ -643,6 +648,11 @@ Http2Decompressor::CopyHuffmanStringFromInput(uint32_t bytes, nsACString &val)
|
||||
}
|
||||
}
|
||||
|
||||
if (bitsLeft > 7) {
|
||||
LOG3(("CopyHuffmanStringFromInput more than 7 bits of padding"));
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
|
||||
if (bitsLeft) {
|
||||
// Any bits left at this point must belong to the EOS symbol, so make sure
|
||||
// they make sense (ie, are all ones)
|
||||
@ -694,23 +704,7 @@ Http2Decompressor::DoIndexed()
|
||||
LOG3(("HTTP decompressor indexed entry %u\n", index));
|
||||
|
||||
if (index == 0) {
|
||||
// Index 0 is a special case - it has extra data tacked on the end to
|
||||
// determine what kind of change to make to the encoding context.
|
||||
//
|
||||
if (mData[mOffset] & 0x80) {
|
||||
// This means we have to clear out the reference set
|
||||
mReferenceSet.Clear();
|
||||
mAlternateReferenceSet.Clear();
|
||||
++mOffset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Getting here means we have to adjust the max table size
|
||||
uint32_t newMaxSize;
|
||||
rv = DecodeInteger(7, newMaxSize);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
return mCompressor->SetMaxBufferSizeInternal(newMaxSize);
|
||||
return NS_ERROR_ILLEGAL_VALUE;
|
||||
}
|
||||
index--; // Internally, we 0-index everything, since this is, y'know, C++
|
||||
|
||||
@ -747,15 +741,17 @@ Http2Decompressor::DoIndexed()
|
||||
}
|
||||
|
||||
nsresult
|
||||
Http2Decompressor::DoLiteralInternal(nsACString &name, nsACString &value)
|
||||
Http2Decompressor::DoLiteralInternal(nsACString &name, nsACString &value,
|
||||
uint32_t namePrefixLen)
|
||||
{
|
||||
// guts of doliteralwithoutindex and doliteralwithincremental
|
||||
MOZ_ASSERT(((mData[mOffset] & 0xC0) == 0x40) || // withoutindex
|
||||
((mData[mOffset] & 0xC0) == 0x00)); // withincremental
|
||||
MOZ_ASSERT(((mData[mOffset] & 0xF0) == 0x00) || // withoutindex
|
||||
((mData[mOffset] & 0xF0) == 0x10) || // neverindexed
|
||||
((mData[mOffset] & 0xC0) == 0x40)); // withincremental
|
||||
|
||||
// first let's get the name
|
||||
uint32_t index;
|
||||
nsresult rv = DecodeInteger(6, index);
|
||||
nsresult rv = DecodeInteger(namePrefixLen, index);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
@ -799,13 +795,13 @@ Http2Decompressor::DoLiteralInternal(nsACString &name, nsACString &value)
|
||||
nsresult
|
||||
Http2Decompressor::DoLiteralWithoutIndex()
|
||||
{
|
||||
// this starts with 01 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xC0) == 0x40);
|
||||
// this starts with 0000 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xF0) == 0x00);
|
||||
|
||||
// This is not indexed so there is no adjustment to the
|
||||
// persistent reference set
|
||||
nsAutoCString name, value;
|
||||
nsresult rv = DoLiteralInternal(name, value);
|
||||
nsresult rv = DoLiteralInternal(name, value, 4);
|
||||
|
||||
LOG3(("HTTP decompressor literal without index %s %s\n",
|
||||
name.get(), value.get()));
|
||||
@ -820,11 +816,11 @@ Http2Decompressor::DoLiteralWithoutIndex()
|
||||
nsresult
|
||||
Http2Decompressor::DoLiteralWithIncremental()
|
||||
{
|
||||
// this starts with 00 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xC0) == 0x00);
|
||||
// this starts with 01 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xC0) == 0x40);
|
||||
|
||||
nsAutoCString name, value;
|
||||
nsresult rv = DoLiteralInternal(name, value);
|
||||
nsresult rv = DoLiteralInternal(name, value, 6);
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = OutputHeader(name, value);
|
||||
if (NS_FAILED(rv))
|
||||
@ -853,6 +849,49 @@ Http2Decompressor::DoLiteralWithIncremental()
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Http2Decompressor::DoLiteralNeverIndexed()
|
||||
{
|
||||
// This starts with 0001 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xF0) == 0x10);
|
||||
|
||||
// This is not indexed so there is no adjustment to the
|
||||
// persistent reference set
|
||||
nsAutoCString name, value;
|
||||
nsresult rv = DoLiteralInternal(name, value, 4);
|
||||
|
||||
LOG3(("HTTP decompressor literal never indexed %s %s\n",
|
||||
name.get(), value.get()));
|
||||
|
||||
// Output the header now because we don't keep void
|
||||
// indicies in the reference set
|
||||
if (NS_SUCCEEDED(rv))
|
||||
rv = OutputHeader(name, value);
|
||||
return rv;
|
||||
}
|
||||
|
||||
nsresult
|
||||
Http2Decompressor::DoContextUpdate()
|
||||
{
|
||||
// This starts with 001 bit pattern
|
||||
MOZ_ASSERT((mData[mOffset] & 0xE0) == 0x20);
|
||||
|
||||
if (mData[mOffset] & 0x10) {
|
||||
// This means we have to clear out the reference set
|
||||
mReferenceSet.Clear();
|
||||
mAlternateReferenceSet.Clear();
|
||||
++mOffset;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
// Getting here means we have to adjust the max table size
|
||||
uint32_t newMaxSize;
|
||||
nsresult rv = DecodeInteger(4, newMaxSize);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
return mCompressor->SetMaxBufferSizeInternal(newMaxSize);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
|
||||
nsresult
|
||||
@ -869,14 +908,15 @@ Http2Compressor::EncodeHeaderBlock(const nsCString &nvInput,
|
||||
mParsedContentLength = -1;
|
||||
|
||||
// colon headers first
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":method"), method));
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":path"), path));
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":authority"), host));
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":scheme"), scheme));
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":method"), method), false);
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":path"), path), false);
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":authority"), host), false);
|
||||
ProcessHeader(nvPair(NS_LITERAL_CSTRING(":scheme"), scheme), false);
|
||||
|
||||
// now the non colon headers
|
||||
const char *beginBuffer = nvInput.BeginReading();
|
||||
|
||||
// This strips off the HTTP/1 method+path+version
|
||||
int32_t crlfIndex = nvInput.Find("\r\n");
|
||||
while (true) {
|
||||
int32_t startIndex = crlfIndex + 2;
|
||||
@ -961,11 +1001,11 @@ Http2Compressor::EncodeHeaderBlock(const nsCString &nvInput,
|
||||
}
|
||||
nsDependentCSubstring cookie = Substring(beginBuffer + nextCookie,
|
||||
beginBuffer + semiSpaceIndex);
|
||||
ProcessHeader(nvPair(name, cookie));
|
||||
ProcessHeader(nvPair(name, cookie), true);
|
||||
nextCookie = semiSpaceIndex + 2;
|
||||
}
|
||||
} else {
|
||||
ProcessHeader(nvPair(name, value));
|
||||
ProcessHeader(nvPair(name, value), name.Equals("authorization") ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -997,15 +1037,32 @@ Http2Compressor::DoOutput(Http2Compressor::outputCode code,
|
||||
uint8_t *startByte;
|
||||
|
||||
switch (code) {
|
||||
case kNeverIndexedLiteral:
|
||||
LOG3(("HTTP compressor %p neverindex literal with name reference %u %s: %s\n",
|
||||
this, index, pair->mName.get(), pair->mValue.get()));
|
||||
|
||||
// In this case, the index will have already been adjusted to be 1-based
|
||||
// instead of 0-based.
|
||||
EncodeInteger(4, index); // 0001 4 bit prefix
|
||||
startByte = reinterpret_cast<unsigned char *>(mOutput->BeginWriting()) + offset;
|
||||
*startByte = (*startByte & 0x0f) | 0x10;
|
||||
|
||||
if (!index) {
|
||||
HuffmanAppend(pair->mName);
|
||||
}
|
||||
|
||||
HuffmanAppend(pair->mValue);
|
||||
break;
|
||||
|
||||
case kPlainLiteral:
|
||||
LOG3(("HTTP compressor %p noindex literal with name reference %u %s: %s\n",
|
||||
this, index, pair->mName.get(), pair->mValue.get()));
|
||||
|
||||
// In this case, the index will have already been adjusted to be 1-based
|
||||
// instead of 0-based.
|
||||
EncodeInteger(6, index); // 01 2 bit prefix
|
||||
EncodeInteger(4, index); // 0000 4 bit prefix
|
||||
startByte = reinterpret_cast<unsigned char *>(mOutput->BeginWriting()) + offset;
|
||||
*startByte = (*startByte & 0x3f) | 0x40;
|
||||
*startByte = *startByte & 0x0f;
|
||||
|
||||
if (!index) {
|
||||
HuffmanAppend(pair->mName);
|
||||
@ -1020,9 +1077,9 @@ Http2Compressor::DoOutput(Http2Compressor::outputCode code,
|
||||
|
||||
// In this case, the index will have already been adjusted to be 1-based
|
||||
// instead of 0-based.
|
||||
EncodeInteger(6, index); // 00 2 bit prefix
|
||||
EncodeInteger(6, index); // 01 2 bit prefix
|
||||
startByte = reinterpret_cast<unsigned char *>(mOutput->BeginWriting()) + offset;
|
||||
*startByte = *startByte & 0x3f;
|
||||
*startByte = (*startByte & 0x3f) | 0x40;
|
||||
|
||||
if (!index) {
|
||||
HuffmanAppend(pair->mName);
|
||||
@ -1182,6 +1239,9 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
uint8_t idx = static_cast<uint8_t>(value[i]);
|
||||
uint8_t huffLength = HuffmanOutgoing[idx].mLength;
|
||||
uint32_t huffValue = HuffmanOutgoing[idx].mValue;
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p character=%c (%d) value=%X "
|
||||
"length=%d offset=%d bitsLeft=%d\n", this, value[i], idx, huffValue,
|
||||
huffLength, offset, bitsLeft));
|
||||
|
||||
if (bitsLeft < 8) {
|
||||
// Fill in the least significant <bitsLeft> bits of the previous byte
|
||||
@ -1195,6 +1255,8 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
}
|
||||
val &= ((1 << bitsLeft) - 1);
|
||||
offset = buf.Length() - 1;
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p appending %X to byte %d.",
|
||||
this, val, offset));
|
||||
startByte = reinterpret_cast<unsigned char *>(buf.BeginWriting()) + offset;
|
||||
*startByte = *startByte | static_cast<uint8_t>(val & 0xFF);
|
||||
if (huffLength >= bitsLeft) {
|
||||
@ -1204,13 +1266,17 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
bitsLeft -= huffLength;
|
||||
huffLength = 0;
|
||||
}
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p encoded length remaining=%d, "
|
||||
"bitsLeft=%d\n", this, huffLength, bitsLeft));
|
||||
}
|
||||
|
||||
while (huffLength > 8) {
|
||||
while (huffLength >= 8) {
|
||||
uint32_t mask = ~((1 << (huffLength - 8)) - 1);
|
||||
uint8_t val = ((huffValue & mask) >> (huffLength - 8)) & 0xFF;
|
||||
buf.Append(reinterpret_cast<char *>(&val), 1);
|
||||
huffLength -= 8;
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p appended byte %X, encoded "
|
||||
"length remaining=%d\n", this, val, huffLength));
|
||||
}
|
||||
|
||||
if (huffLength) {
|
||||
@ -1218,6 +1284,8 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
bitsLeft = 8 - huffLength;
|
||||
uint8_t val = (huffValue & ((1 << huffLength) - 1)) << bitsLeft;
|
||||
buf.Append(reinterpret_cast<char *>(&val), 1);
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p setting high %d bits of last "
|
||||
"byte to %X. bitsLeft=%d.\n", this, huffLength, val, bitsLeft));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1228,6 +1296,8 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
offset = buf.Length() - 1;
|
||||
startByte = reinterpret_cast<unsigned char *>(buf.BeginWriting()) + offset;
|
||||
*startByte = *startByte | val;
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p padded low %d bits of last byte "
|
||||
"with %X", this, bitsLeft, val));
|
||||
}
|
||||
|
||||
// Now we know how long our encoded string is, we can fill in our length
|
||||
@ -1239,10 +1309,12 @@ Http2Compressor::HuffmanAppend(const nsCString &value)
|
||||
|
||||
// Finally, we can add our REAL data!
|
||||
mOutput->Append(buf);
|
||||
LOG3(("Http2Compressor::HuffmanAppend %p encoded %d byte original on %d "
|
||||
"bytes.\n", this, length, bufLength));
|
||||
}
|
||||
|
||||
void
|
||||
Http2Compressor::ProcessHeader(const nvPair inputPair)
|
||||
Http2Compressor::ProcessHeader(const nvPair inputPair, bool neverIndex)
|
||||
{
|
||||
uint32_t newSize = inputPair.Size();
|
||||
uint32_t headerTableSize = mHeaderTable.Length();
|
||||
@ -1262,7 +1334,12 @@ Http2Compressor::ProcessHeader(const nvPair inputPair)
|
||||
}
|
||||
|
||||
// We need to emit a new literal
|
||||
if (!match) {
|
||||
if (!match || neverIndex) {
|
||||
if (neverIndex) {
|
||||
DoOutput(kNeverIndexedLiteral, &inputPair, nameReference);
|
||||
return;
|
||||
}
|
||||
|
||||
if ((newSize > (mMaxBuffer / 2)) || (mMaxBuffer < 128)) {
|
||||
DoOutput(kPlainLiteral, &inputPair, nameReference);
|
||||
return;
|
||||
|
@ -117,7 +117,9 @@ private:
|
||||
nsresult DoIndexed();
|
||||
nsresult DoLiteralWithoutIndex();
|
||||
nsresult DoLiteralWithIncremental();
|
||||
nsresult DoLiteralInternal(nsACString &, nsACString &);
|
||||
nsresult DoLiteralInternal(nsACString &, nsACString &, uint32_t);
|
||||
nsresult DoLiteralNeverIndexed();
|
||||
nsresult DoContextUpdate();
|
||||
|
||||
nsresult DecodeInteger(uint32_t prefixLen, uint32_t &result);
|
||||
nsresult OutputHeader(uint32_t index);
|
||||
@ -173,6 +175,7 @@ protected:
|
||||
|
||||
private:
|
||||
enum outputCode {
|
||||
kNeverIndexedLiteral,
|
||||
kPlainLiteral,
|
||||
kIndexedLiteral,
|
||||
kToggleOff,
|
||||
@ -183,7 +186,7 @@ private:
|
||||
void DoOutput(Http2Compressor::outputCode code,
|
||||
const class nvPair *pair, uint32_t index);
|
||||
void EncodeInteger(uint32_t prefixLen, uint32_t val);
|
||||
void ProcessHeader(const nvPair inputPair);
|
||||
void ProcessHeader(const nvPair inputPair, bool neverIndex);
|
||||
void HuffmanAppend(const nsCString &value);
|
||||
|
||||
int64_t mParsedContentLength;
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -13,228 +13,6 @@ struct HuffmanOutgoingEntry {
|
||||
};
|
||||
|
||||
static HuffmanOutgoingEntry HuffmanOutgoing[] = {
|
||||
{ 0x07ffffba, 27 },
|
||||
{ 0x07ffffbb, 27 },
|
||||
{ 0x07ffffbc, 27 },
|
||||
{ 0x07ffffbd, 27 },
|
||||
{ 0x07ffffbe, 27 },
|
||||
{ 0x07ffffbf, 27 },
|
||||
{ 0x07ffffc0, 27 },
|
||||
{ 0x07ffffc1, 27 },
|
||||
{ 0x07ffffc2, 27 },
|
||||
{ 0x07ffffc3, 27 },
|
||||
{ 0x07ffffc4, 27 },
|
||||
{ 0x07ffffc5, 27 },
|
||||
{ 0x07ffffc6, 27 },
|
||||
{ 0x07ffffc7, 27 },
|
||||
{ 0x07ffffc8, 27 },
|
||||
{ 0x07ffffc9, 27 },
|
||||
{ 0x07ffffca, 27 },
|
||||
{ 0x07ffffcb, 27 },
|
||||
{ 0x07ffffcc, 27 },
|
||||
{ 0x07ffffcd, 27 },
|
||||
{ 0x07ffffce, 27 },
|
||||
{ 0x07ffffcf, 27 },
|
||||
{ 0x07ffffd0, 27 },
|
||||
{ 0x07ffffd1, 27 },
|
||||
{ 0x07ffffd2, 27 },
|
||||
{ 0x07ffffd3, 27 },
|
||||
{ 0x07ffffd4, 27 },
|
||||
{ 0x07ffffd5, 27 },
|
||||
{ 0x07ffffd6, 27 },
|
||||
{ 0x07ffffd7, 27 },
|
||||
{ 0x07ffffd8, 27 },
|
||||
{ 0x07ffffd9, 27 },
|
||||
{ 0x000000e8, 8 },
|
||||
{ 0x00000ffc, 12 },
|
||||
{ 0x00003ffa, 14 },
|
||||
{ 0x00007ffc, 15 },
|
||||
{ 0x00007ffd, 15 },
|
||||
{ 0x00000024, 6 },
|
||||
{ 0x0000006e, 7 },
|
||||
{ 0x00007ffe, 15 },
|
||||
{ 0x000007fa, 11 },
|
||||
{ 0x000007fb, 11 },
|
||||
{ 0x000003fa, 10 },
|
||||
{ 0x000007fc, 11 },
|
||||
{ 0x000000e9, 8 },
|
||||
{ 0x00000025, 6 },
|
||||
{ 0x00000004, 5 },
|
||||
{ 0x00000000, 4 },
|
||||
{ 0x00000005, 5 },
|
||||
{ 0x00000006, 5 },
|
||||
{ 0x00000007, 5 },
|
||||
{ 0x00000026, 6 },
|
||||
{ 0x00000027, 6 },
|
||||
{ 0x00000028, 6 },
|
||||
{ 0x00000029, 6 },
|
||||
{ 0x0000002a, 6 },
|
||||
{ 0x0000002b, 6 },
|
||||
{ 0x0000002c, 6 },
|
||||
{ 0x000001ec, 9 },
|
||||
{ 0x000000ea, 8 },
|
||||
{ 0x0003fffe, 18 },
|
||||
{ 0x0000002d, 6 },
|
||||
{ 0x0001fffc, 17 },
|
||||
{ 0x000001ed, 9 },
|
||||
{ 0x00003ffb, 14 },
|
||||
{ 0x0000006f, 7 },
|
||||
{ 0x000000eb, 8 },
|
||||
{ 0x000000ec, 8 },
|
||||
{ 0x000000ed, 8 },
|
||||
{ 0x000000ee, 8 },
|
||||
{ 0x00000070, 7 },
|
||||
{ 0x000001ee, 9 },
|
||||
{ 0x000001ef, 9 },
|
||||
{ 0x000001f0, 9 },
|
||||
{ 0x000001f1, 9 },
|
||||
{ 0x000003fb, 10 },
|
||||
{ 0x000001f2, 9 },
|
||||
{ 0x000000ef, 8 },
|
||||
{ 0x000001f3, 9 },
|
||||
{ 0x000001f4, 9 },
|
||||
{ 0x000001f5, 9 },
|
||||
{ 0x000001f6, 9 },
|
||||
{ 0x000001f7, 9 },
|
||||
{ 0x000000f0, 8 },
|
||||
{ 0x000000f1, 8 },
|
||||
{ 0x000001f8, 9 },
|
||||
{ 0x000001f9, 9 },
|
||||
{ 0x000001fa, 9 },
|
||||
{ 0x000001fb, 9 },
|
||||
{ 0x000001fc, 9 },
|
||||
{ 0x000003fc, 10 },
|
||||
{ 0x00003ffc, 14 },
|
||||
{ 0x07ffffda, 27 },
|
||||
{ 0x00001ffc, 13 },
|
||||
{ 0x00003ffd, 14 },
|
||||
{ 0x0000002e, 6 },
|
||||
{ 0x0007fffe, 19 },
|
||||
{ 0x00000008, 5 },
|
||||
{ 0x0000002f, 6 },
|
||||
{ 0x00000009, 5 },
|
||||
{ 0x00000030, 6 },
|
||||
{ 0x00000001, 4 },
|
||||
{ 0x00000031, 6 },
|
||||
{ 0x00000032, 6 },
|
||||
{ 0x00000033, 6 },
|
||||
{ 0x0000000a, 5 },
|
||||
{ 0x00000071, 7 },
|
||||
{ 0x00000072, 7 },
|
||||
{ 0x0000000b, 5 },
|
||||
{ 0x00000034, 6 },
|
||||
{ 0x0000000c, 5 },
|
||||
{ 0x0000000d, 5 },
|
||||
{ 0x0000000e, 5 },
|
||||
{ 0x000000f2, 8 },
|
||||
{ 0x0000000f, 5 },
|
||||
{ 0x00000010, 5 },
|
||||
{ 0x00000011, 5 },
|
||||
{ 0x00000035, 6 },
|
||||
{ 0x00000073, 7 },
|
||||
{ 0x00000036, 6 },
|
||||
{ 0x000000f3, 8 },
|
||||
{ 0x000000f4, 8 },
|
||||
{ 0x000000f5, 8 },
|
||||
{ 0x0001fffd, 17 },
|
||||
{ 0x000007fd, 11 },
|
||||
{ 0x0001fffe, 17 },
|
||||
{ 0x00000ffd, 12 },
|
||||
{ 0x07ffffdb, 27 },
|
||||
{ 0x07ffffdc, 27 },
|
||||
{ 0x07ffffdd, 27 },
|
||||
{ 0x07ffffde, 27 },
|
||||
{ 0x07ffffdf, 27 },
|
||||
{ 0x07ffffe0, 27 },
|
||||
{ 0x07ffffe1, 27 },
|
||||
{ 0x07ffffe2, 27 },
|
||||
{ 0x07ffffe3, 27 },
|
||||
{ 0x07ffffe4, 27 },
|
||||
{ 0x07ffffe5, 27 },
|
||||
{ 0x07ffffe6, 27 },
|
||||
{ 0x07ffffe7, 27 },
|
||||
{ 0x07ffffe8, 27 },
|
||||
{ 0x07ffffe9, 27 },
|
||||
{ 0x07ffffea, 27 },
|
||||
{ 0x07ffffeb, 27 },
|
||||
{ 0x07ffffec, 27 },
|
||||
{ 0x07ffffed, 27 },
|
||||
{ 0x07ffffee, 27 },
|
||||
{ 0x07ffffef, 27 },
|
||||
{ 0x07fffff0, 27 },
|
||||
{ 0x07fffff1, 27 },
|
||||
{ 0x07fffff2, 27 },
|
||||
{ 0x07fffff3, 27 },
|
||||
{ 0x07fffff4, 27 },
|
||||
{ 0x07fffff5, 27 },
|
||||
{ 0x07fffff6, 27 },
|
||||
{ 0x07fffff7, 27 },
|
||||
{ 0x07fffff8, 27 },
|
||||
{ 0x07fffff9, 27 },
|
||||
{ 0x07fffffa, 27 },
|
||||
{ 0x07fffffb, 27 },
|
||||
{ 0x07fffffc, 27 },
|
||||
{ 0x07fffffd, 27 },
|
||||
{ 0x07fffffe, 27 },
|
||||
{ 0x07ffffff, 27 },
|
||||
{ 0x03ffff80, 26 },
|
||||
{ 0x03ffff81, 26 },
|
||||
{ 0x03ffff82, 26 },
|
||||
{ 0x03ffff83, 26 },
|
||||
{ 0x03ffff84, 26 },
|
||||
{ 0x03ffff85, 26 },
|
||||
{ 0x03ffff86, 26 },
|
||||
{ 0x03ffff87, 26 },
|
||||
{ 0x03ffff88, 26 },
|
||||
{ 0x03ffff89, 26 },
|
||||
{ 0x03ffff8a, 26 },
|
||||
{ 0x03ffff8b, 26 },
|
||||
{ 0x03ffff8c, 26 },
|
||||
{ 0x03ffff8d, 26 },
|
||||
{ 0x03ffff8e, 26 },
|
||||
{ 0x03ffff8f, 26 },
|
||||
{ 0x03ffff90, 26 },
|
||||
{ 0x03ffff91, 26 },
|
||||
{ 0x03ffff92, 26 },
|
||||
{ 0x03ffff93, 26 },
|
||||
{ 0x03ffff94, 26 },
|
||||
{ 0x03ffff95, 26 },
|
||||
{ 0x03ffff96, 26 },
|
||||
{ 0x03ffff97, 26 },
|
||||
{ 0x03ffff98, 26 },
|
||||
{ 0x03ffff99, 26 },
|
||||
{ 0x03ffff9a, 26 },
|
||||
{ 0x03ffff9b, 26 },
|
||||
{ 0x03ffff9c, 26 },
|
||||
{ 0x03ffff9d, 26 },
|
||||
{ 0x03ffff9e, 26 },
|
||||
{ 0x03ffff9f, 26 },
|
||||
{ 0x03ffffa0, 26 },
|
||||
{ 0x03ffffa1, 26 },
|
||||
{ 0x03ffffa2, 26 },
|
||||
{ 0x03ffffa3, 26 },
|
||||
{ 0x03ffffa4, 26 },
|
||||
{ 0x03ffffa5, 26 },
|
||||
{ 0x03ffffa6, 26 },
|
||||
{ 0x03ffffa7, 26 },
|
||||
{ 0x03ffffa8, 26 },
|
||||
{ 0x03ffffa9, 26 },
|
||||
{ 0x03ffffaa, 26 },
|
||||
{ 0x03ffffab, 26 },
|
||||
{ 0x03ffffac, 26 },
|
||||
{ 0x03ffffad, 26 },
|
||||
{ 0x03ffffae, 26 },
|
||||
{ 0x03ffffaf, 26 },
|
||||
{ 0x03ffffb0, 26 },
|
||||
{ 0x03ffffb1, 26 },
|
||||
{ 0x03ffffb2, 26 },
|
||||
{ 0x03ffffb3, 26 },
|
||||
{ 0x03ffffb4, 26 },
|
||||
{ 0x03ffffb5, 26 },
|
||||
{ 0x03ffffb6, 26 },
|
||||
{ 0x03ffffb7, 26 },
|
||||
{ 0x03ffffb8, 26 },
|
||||
{ 0x03ffffb9, 26 },
|
||||
{ 0x03ffffba, 26 },
|
||||
{ 0x03ffffbb, 26 },
|
||||
{ 0x03ffffbc, 26 },
|
||||
@ -267,9 +45,231 @@ static HuffmanOutgoingEntry HuffmanOutgoing[] = {
|
||||
{ 0x03ffffd7, 26 },
|
||||
{ 0x03ffffd8, 26 },
|
||||
{ 0x03ffffd9, 26 },
|
||||
{ 0x00000006, 5 },
|
||||
{ 0x00001ffc, 13 },
|
||||
{ 0x000001f0, 9 },
|
||||
{ 0x00003ffc, 14 },
|
||||
{ 0x00007ffc, 15 },
|
||||
{ 0x0000001e, 6 },
|
||||
{ 0x00000064, 7 },
|
||||
{ 0x00001ffd, 13 },
|
||||
{ 0x000003fa, 10 },
|
||||
{ 0x000001f1, 9 },
|
||||
{ 0x000003fb, 10 },
|
||||
{ 0x000003fc, 10 },
|
||||
{ 0x00000065, 7 },
|
||||
{ 0x00000066, 7 },
|
||||
{ 0x0000001f, 6 },
|
||||
{ 0x00000007, 5 },
|
||||
{ 0x00000000, 4 },
|
||||
{ 0x00000001, 4 },
|
||||
{ 0x00000002, 4 },
|
||||
{ 0x00000008, 5 },
|
||||
{ 0x00000020, 6 },
|
||||
{ 0x00000021, 6 },
|
||||
{ 0x00000022, 6 },
|
||||
{ 0x00000023, 6 },
|
||||
{ 0x00000024, 6 },
|
||||
{ 0x00000025, 6 },
|
||||
{ 0x00000026, 6 },
|
||||
{ 0x000000ec, 8 },
|
||||
{ 0x0001fffc, 17 },
|
||||
{ 0x00000027, 6 },
|
||||
{ 0x00007ffd, 15 },
|
||||
{ 0x000003fd, 10 },
|
||||
{ 0x00007ffe, 15 },
|
||||
{ 0x00000067, 7 },
|
||||
{ 0x000000ed, 8 },
|
||||
{ 0x000000ee, 8 },
|
||||
{ 0x00000068, 7 },
|
||||
{ 0x000000ef, 8 },
|
||||
{ 0x00000069, 7 },
|
||||
{ 0x0000006a, 7 },
|
||||
{ 0x000001f2, 9 },
|
||||
{ 0x000000f0, 8 },
|
||||
{ 0x000001f3, 9 },
|
||||
{ 0x000001f4, 9 },
|
||||
{ 0x000001f5, 9 },
|
||||
{ 0x0000006b, 7 },
|
||||
{ 0x0000006c, 7 },
|
||||
{ 0x000000f1, 8 },
|
||||
{ 0x000000f2, 8 },
|
||||
{ 0x000001f6, 9 },
|
||||
{ 0x000001f7, 9 },
|
||||
{ 0x0000006d, 7 },
|
||||
{ 0x00000028, 6 },
|
||||
{ 0x000000f3, 8 },
|
||||
{ 0x000001f8, 9 },
|
||||
{ 0x000001f9, 9 },
|
||||
{ 0x000000f4, 8 },
|
||||
{ 0x000001fa, 9 },
|
||||
{ 0x000001fb, 9 },
|
||||
{ 0x000007fc, 11 },
|
||||
{ 0x03ffffda, 26 },
|
||||
{ 0x000007fd, 11 },
|
||||
{ 0x00003ffd, 14 },
|
||||
{ 0x0000006e, 7 },
|
||||
{ 0x0003fffe, 18 },
|
||||
{ 0x00000009, 5 },
|
||||
{ 0x0000006f, 7 },
|
||||
{ 0x0000000a, 5 },
|
||||
{ 0x00000029, 6 },
|
||||
{ 0x0000000b, 5 },
|
||||
{ 0x00000070, 7 },
|
||||
{ 0x0000002a, 6 },
|
||||
{ 0x0000002b, 6 },
|
||||
{ 0x0000000c, 5 },
|
||||
{ 0x000000f5, 8 },
|
||||
{ 0x000000f6, 8 },
|
||||
{ 0x0000002c, 6 },
|
||||
{ 0x0000002d, 6 },
|
||||
{ 0x0000002e, 6 },
|
||||
{ 0x0000000d, 5 },
|
||||
{ 0x0000002f, 6 },
|
||||
{ 0x000001fc, 9 },
|
||||
{ 0x00000030, 6 },
|
||||
{ 0x00000031, 6 },
|
||||
{ 0x0000000e, 5 },
|
||||
{ 0x00000071, 7 },
|
||||
{ 0x00000072, 7 },
|
||||
{ 0x00000073, 7 },
|
||||
{ 0x00000074, 7 },
|
||||
{ 0x00000075, 7 },
|
||||
{ 0x000000f7, 8 },
|
||||
{ 0x0001fffd, 17 },
|
||||
{ 0x00000ffc, 12 },
|
||||
{ 0x0001fffe, 17 },
|
||||
{ 0x00000ffd, 12 },
|
||||
{ 0x03ffffdb, 26 },
|
||||
{ 0x03ffffdc, 26 }
|
||||
{ 0x03ffffdc, 26 },
|
||||
{ 0x03ffffdd, 26 },
|
||||
{ 0x03ffffde, 26 },
|
||||
{ 0x03ffffdf, 26 },
|
||||
{ 0x03ffffe0, 26 },
|
||||
{ 0x03ffffe1, 26 },
|
||||
{ 0x03ffffe2, 26 },
|
||||
{ 0x03ffffe3, 26 },
|
||||
{ 0x03ffffe4, 26 },
|
||||
{ 0x03ffffe5, 26 },
|
||||
{ 0x03ffffe6, 26 },
|
||||
{ 0x03ffffe7, 26 },
|
||||
{ 0x03ffffe8, 26 },
|
||||
{ 0x03ffffe9, 26 },
|
||||
{ 0x03ffffea, 26 },
|
||||
{ 0x03ffffeb, 26 },
|
||||
{ 0x03ffffec, 26 },
|
||||
{ 0x03ffffed, 26 },
|
||||
{ 0x03ffffee, 26 },
|
||||
{ 0x03ffffef, 26 },
|
||||
{ 0x03fffff0, 26 },
|
||||
{ 0x03fffff1, 26 },
|
||||
{ 0x03fffff2, 26 },
|
||||
{ 0x03fffff3, 26 },
|
||||
{ 0x03fffff4, 26 },
|
||||
{ 0x03fffff5, 26 },
|
||||
{ 0x03fffff6, 26 },
|
||||
{ 0x03fffff7, 26 },
|
||||
{ 0x03fffff8, 26 },
|
||||
{ 0x03fffff9, 26 },
|
||||
{ 0x03fffffa, 26 },
|
||||
{ 0x03fffffb, 26 },
|
||||
{ 0x03fffffc, 26 },
|
||||
{ 0x03fffffd, 26 },
|
||||
{ 0x03fffffe, 26 },
|
||||
{ 0x03ffffff, 26 },
|
||||
{ 0x01ffff80, 25 },
|
||||
{ 0x01ffff81, 25 },
|
||||
{ 0x01ffff82, 25 },
|
||||
{ 0x01ffff83, 25 },
|
||||
{ 0x01ffff84, 25 },
|
||||
{ 0x01ffff85, 25 },
|
||||
{ 0x01ffff86, 25 },
|
||||
{ 0x01ffff87, 25 },
|
||||
{ 0x01ffff88, 25 },
|
||||
{ 0x01ffff89, 25 },
|
||||
{ 0x01ffff8a, 25 },
|
||||
{ 0x01ffff8b, 25 },
|
||||
{ 0x01ffff8c, 25 },
|
||||
{ 0x01ffff8d, 25 },
|
||||
{ 0x01ffff8e, 25 },
|
||||
{ 0x01ffff8f, 25 },
|
||||
{ 0x01ffff90, 25 },
|
||||
{ 0x01ffff91, 25 },
|
||||
{ 0x01ffff92, 25 },
|
||||
{ 0x01ffff93, 25 },
|
||||
{ 0x01ffff94, 25 },
|
||||
{ 0x01ffff95, 25 },
|
||||
{ 0x01ffff96, 25 },
|
||||
{ 0x01ffff97, 25 },
|
||||
{ 0x01ffff98, 25 },
|
||||
{ 0x01ffff99, 25 },
|
||||
{ 0x01ffff9a, 25 },
|
||||
{ 0x01ffff9b, 25 },
|
||||
{ 0x01ffff9c, 25 },
|
||||
{ 0x01ffff9d, 25 },
|
||||
{ 0x01ffff9e, 25 },
|
||||
{ 0x01ffff9f, 25 },
|
||||
{ 0x01ffffa0, 25 },
|
||||
{ 0x01ffffa1, 25 },
|
||||
{ 0x01ffffa2, 25 },
|
||||
{ 0x01ffffa3, 25 },
|
||||
{ 0x01ffffa4, 25 },
|
||||
{ 0x01ffffa5, 25 },
|
||||
{ 0x01ffffa6, 25 },
|
||||
{ 0x01ffffa7, 25 },
|
||||
{ 0x01ffffa8, 25 },
|
||||
{ 0x01ffffa9, 25 },
|
||||
{ 0x01ffffaa, 25 },
|
||||
{ 0x01ffffab, 25 },
|
||||
{ 0x01ffffac, 25 },
|
||||
{ 0x01ffffad, 25 },
|
||||
{ 0x01ffffae, 25 },
|
||||
{ 0x01ffffaf, 25 },
|
||||
{ 0x01ffffb0, 25 },
|
||||
{ 0x01ffffb1, 25 },
|
||||
{ 0x01ffffb2, 25 },
|
||||
{ 0x01ffffb3, 25 },
|
||||
{ 0x01ffffb4, 25 },
|
||||
{ 0x01ffffb5, 25 },
|
||||
{ 0x01ffffb6, 25 },
|
||||
{ 0x01ffffb7, 25 },
|
||||
{ 0x01ffffb8, 25 },
|
||||
{ 0x01ffffb9, 25 },
|
||||
{ 0x01ffffba, 25 },
|
||||
{ 0x01ffffbb, 25 },
|
||||
{ 0x01ffffbc, 25 },
|
||||
{ 0x01ffffbd, 25 },
|
||||
{ 0x01ffffbe, 25 },
|
||||
{ 0x01ffffbf, 25 },
|
||||
{ 0x01ffffc0, 25 },
|
||||
{ 0x01ffffc1, 25 },
|
||||
{ 0x01ffffc2, 25 },
|
||||
{ 0x01ffffc3, 25 },
|
||||
{ 0x01ffffc4, 25 },
|
||||
{ 0x01ffffc5, 25 },
|
||||
{ 0x01ffffc6, 25 },
|
||||
{ 0x01ffffc7, 25 },
|
||||
{ 0x01ffffc8, 25 },
|
||||
{ 0x01ffffc9, 25 },
|
||||
{ 0x01ffffca, 25 },
|
||||
{ 0x01ffffcb, 25 },
|
||||
{ 0x01ffffcc, 25 },
|
||||
{ 0x01ffffcd, 25 },
|
||||
{ 0x01ffffce, 25 },
|
||||
{ 0x01ffffcf, 25 },
|
||||
{ 0x01ffffd0, 25 },
|
||||
{ 0x01ffffd1, 25 },
|
||||
{ 0x01ffffd2, 25 },
|
||||
{ 0x01ffffd3, 25 },
|
||||
{ 0x01ffffd4, 25 },
|
||||
{ 0x01ffffd5, 25 },
|
||||
{ 0x01ffffd6, 25 },
|
||||
{ 0x01ffffd7, 25 },
|
||||
{ 0x01ffffd8, 25 },
|
||||
{ 0x01ffffd9, 25 },
|
||||
{ 0x01ffffda, 25 },
|
||||
{ 0x01ffffdb, 25 },
|
||||
{ 0x01ffffdc, 25 }
|
||||
};
|
||||
|
||||
} // namespace net
|
||||
|
@ -43,7 +43,10 @@ Http2PushedStream::Http2PushedStream(Http2PushTransactionBuffer *aTransaction,
|
||||
mBufferedPush->SetPushStream(this);
|
||||
mLoadGroupCI = aAssociatedStream->LoadGroupConnectionInfo();
|
||||
mLastRead = TimeStamp::Now();
|
||||
SetPriority(aAssociatedStream->Priority() + 1);
|
||||
uint32_t priorityGroup = aAssociatedStream->Priority() + 1;
|
||||
uint8_t priorityGroupWeight = (nsISupportsPriority::PRIORITY_LOWEST + 1) -
|
||||
(priorityGroup - kNormalPriority);
|
||||
SetPriorityGroup(priorityGroup, priorityGroupWeight);
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -229,7 +229,8 @@ static Http2ControlFx sControlFunctions[] = {
|
||||
Http2Session::RecvPing,
|
||||
Http2Session::RecvGoAway,
|
||||
Http2Session::RecvWindowUpdate,
|
||||
Http2Session::RecvContinuation
|
||||
Http2Session::RecvContinuation,
|
||||
Http2Session::RecvAltSvc
|
||||
};
|
||||
|
||||
bool
|
||||
@ -698,19 +699,21 @@ Http2Session::GenerateSettingsAck()
|
||||
}
|
||||
|
||||
void
|
||||
Http2Session::GeneratePriority(uint32_t aID, uint32_t aPriority)
|
||||
Http2Session::GeneratePriority(uint32_t aID, uint32_t aPriorityGroup,
|
||||
uint8_t aPriorityGroupWeight)
|
||||
{
|
||||
MOZ_ASSERT(PR_GetCurrentThread() == gSocketThread);
|
||||
LOG3(("Http2Session::GeneratePriority %p %X %X\n",
|
||||
this, aID, aPriority));
|
||||
LOG3(("Http2Session::GeneratePriority %p %X %X %X\n",
|
||||
this, aID, aPriorityGroup, aPriorityGroupWeight));
|
||||
|
||||
char *packet = EnsureOutputBuffer(12);
|
||||
mOutputQueueUsed += 12;
|
||||
char *packet = EnsureOutputBuffer(13);
|
||||
mOutputQueueUsed += 13;
|
||||
|
||||
CreateFrameHeader(packet, 4, FRAME_TYPE_PRIORITY, 0, aID);
|
||||
aPriority = PR_htonl(aPriority);
|
||||
memcpy(packet + 8, &aPriority, 4);
|
||||
LogIO(this, nullptr, "Generate Priority", packet, 12);
|
||||
CreateFrameHeader(packet, 5, FRAME_TYPE_PRIORITY, kFlag_PRIORITY_GROUP, aID);
|
||||
aPriorityGroup = PR_htonl(aPriorityGroup);
|
||||
memcpy(packet + 8, &aPriorityGroup, 4);
|
||||
memcpy(packet + 12, &aPriorityGroupWeight, 1);
|
||||
LogIO(this, nullptr, "Generate Priority", packet, 13);
|
||||
FlushOutputQueue();
|
||||
}
|
||||
|
||||
@ -1030,7 +1033,7 @@ Http2Session::ParsePadding(uint8_t &paddingControlBytes, uint16_t &paddingLength
|
||||
|
||||
if (paddingLength > mInputFrameDataSize) {
|
||||
// This is fatal to the session
|
||||
LOG3(("Http2Session::RecvHeaders %p stream 0x%x PROTOCOL_ERROR "
|
||||
LOG3(("Http2Session::ParsePadding %p stream 0x%x PROTOCOL_ERROR "
|
||||
"paddingLength %d > frame size %d\n",
|
||||
this, mInputFrameID, paddingLength, mInputFrameDataSize));
|
||||
RETURN_SESSION_ERROR(this, PROTOCOL_ERROR);
|
||||
@ -1053,7 +1056,17 @@ Http2Session::RecvHeaders(Http2Session *self)
|
||||
else
|
||||
self->mExpectedHeaderID = self->mInputFrameID;
|
||||
|
||||
uint32_t priorityLen = (self->mInputFrameFlags & kFlag_PRIORITY) ? 4 : 0;
|
||||
if ((self->mInputFrameFlags & kFlag_PRIORITY_GROUP) &&
|
||||
(self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY)) {
|
||||
RETURN_SESSION_ERROR(self, PROTOCOL_ERROR);
|
||||
}
|
||||
|
||||
uint32_t priorityLen = 0;
|
||||
if (self->mInputFrameFlags & kFlag_PRIORITY_GROUP) {
|
||||
priorityLen = 5;
|
||||
} else if (self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY) {
|
||||
priorityLen = 4;
|
||||
}
|
||||
self->SetInputFrameDataStream(self->mInputFrameID);
|
||||
|
||||
// Find out how much padding this frame has, so we can only extract the real
|
||||
@ -1067,12 +1080,13 @@ Http2Session::RecvHeaders(Http2Session *self)
|
||||
}
|
||||
|
||||
LOG3(("Http2Session::RecvHeaders %p stream 0x%X priorityLen=%d stream=%p "
|
||||
"end_stream=%d end_headers=%d priority_flag=%d paddingLength=%d "
|
||||
"pad_high_flag=%d pad_low_flag=%d\n",
|
||||
"end_stream=%d end_headers=%d priority_group=%d priority_dependency=%d "
|
||||
"paddingLength=%d pad_high_flag=%d pad_low_flag=%d\n",
|
||||
self, self->mInputFrameID, priorityLen, self->mInputFrameDataStream,
|
||||
self->mInputFrameFlags & kFlag_END_STREAM,
|
||||
self->mInputFrameFlags & kFlag_END_HEADERS,
|
||||
self->mInputFrameFlags & kFlag_PRIORITY,
|
||||
self->mInputFrameFlags & kFlag_PRIORITY_GROUP,
|
||||
self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY,
|
||||
paddingLength,
|
||||
self->mInputFrameFlags & kFlag_PAD_HIGH,
|
||||
self->mInputFrameFlags & kFlag_PAD_LOW));
|
||||
@ -1163,7 +1177,27 @@ Http2Session::RecvPriority(Http2Session *self)
|
||||
{
|
||||
MOZ_ASSERT(self->mInputFrameType == FRAME_TYPE_PRIORITY);
|
||||
|
||||
if (self->mInputFrameDataSize != 4) {
|
||||
if ((self->mInputFrameFlags & kFlag_PRIORITY_GROUP) &&
|
||||
(self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY)) {
|
||||
self->GenerateRstStream(PROTOCOL_ERROR, self->mInputFrameID);
|
||||
self->ResetDownstreamState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
if (!(self->mInputFrameFlags & (kFlag_PRIORITY_GROUP | kFlag_PRIORITY_DEPENDENCY))) {
|
||||
self->GenerateRstStream(PROTOCOL_ERROR, self->mInputFrameID);
|
||||
self->ResetDownstreamState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
uint32_t dataLength = 0;
|
||||
if (self->mInputFrameFlags & kFlag_PRIORITY_GROUP) {
|
||||
dataLength = 5;
|
||||
} else { // self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY
|
||||
dataLength = 4;
|
||||
}
|
||||
|
||||
if (self->mInputFrameDataSize != dataLength) {
|
||||
LOG3(("Http2Session::RecvPriority %p wrong length data=%d\n",
|
||||
self, self->mInputFrameDataSize));
|
||||
RETURN_SESSION_ERROR(self, PROTOCOL_ERROR);
|
||||
@ -1174,16 +1208,30 @@ Http2Session::RecvPriority(Http2Session *self)
|
||||
RETURN_SESSION_ERROR(self, PROTOCOL_ERROR);
|
||||
}
|
||||
|
||||
uint32_t newPriority =
|
||||
PR_ntohl(reinterpret_cast<uint32_t *>(self->mInputFrameBuffer.get())[2]);
|
||||
newPriority &= 0x7fffffff;
|
||||
|
||||
nsresult rv = self->SetInputFrameDataStream(self->mInputFrameID);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
if (self->mInputFrameDataStream)
|
||||
self->mInputFrameDataStream->SetPriority(newPriority);
|
||||
if (self->mInputFrameFlags & kFlag_PRIORITY_GROUP) {
|
||||
uint32_t newPriorityGroup =
|
||||
PR_ntohl(reinterpret_cast<uint32_t *>(self->mInputFrameBuffer.get())[2]);
|
||||
newPriorityGroup &= 0x7fffffff;
|
||||
uint8_t newPriorityGroupWeight = *(self->mInputFrameBuffer.get() + 12);
|
||||
if (self->mInputFrameDataStream) {
|
||||
self->mInputFrameDataStream->SetPriorityGroup(newPriorityGroup,
|
||||
newPriorityGroupWeight);
|
||||
}
|
||||
} else { // self->mInputFrameFlags & kFlag_PRIORITY_DEPENDENCY
|
||||
uint32_t newPriorityDependency =
|
||||
PR_ntohl(reinterpret_cast<uint32_t *>(self->mInputFrameBuffer.get())[2]);
|
||||
bool exclusive = !!(newPriorityDependency & 0x80000000);
|
||||
newPriorityDependency &= 0x7fffffff;
|
||||
if (self->mInputFrameDataStream) {
|
||||
self->mInputFrameDataStream->SetPriorityDependency(newPriorityDependency,
|
||||
exclusive);
|
||||
}
|
||||
}
|
||||
|
||||
self->ResetDownstreamState();
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1322,16 +1370,9 @@ Http2Session::RecvPushPromise(Http2Session *self)
|
||||
// header data from the frame.
|
||||
uint16_t paddingLength = 0;
|
||||
uint8_t paddingControlBytes = 0;
|
||||
// TODO - will need to change this once PUSH_PROMISE allows padding
|
||||
// (post-draft10)
|
||||
// Right now, only CONTINUATION frames can have padding, and
|
||||
// mExpectedPushPromiseID being set indicates that we're actually processing a
|
||||
// CONTINUATION frame.
|
||||
if (self->mExpectedPushPromiseID) {
|
||||
nsresult rv = self->ParsePadding(paddingControlBytes, paddingLength);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
nsresult rv = self->ParsePadding(paddingControlBytes, paddingLength);
|
||||
if (NS_FAILED(rv)) {
|
||||
return rv;
|
||||
}
|
||||
|
||||
// If this doesn't have END_PUSH_PROMISE set on it then require the next
|
||||
@ -1343,11 +1384,9 @@ Http2Session::RecvPushPromise(Http2Session *self)
|
||||
promiseLen = 0; // really a continuation frame
|
||||
promisedID = self->mContinuedPromiseStream;
|
||||
} else {
|
||||
// TODO - will need to handle padding here when getting the promisedID, once
|
||||
// PUSH_PROMISE allows padding (post-draft10)
|
||||
promiseLen = 4;
|
||||
promisedID =
|
||||
PR_ntohl(reinterpret_cast<uint32_t *>(self->mInputFrameBuffer.get())[2]);
|
||||
PR_ntohl(*reinterpret_cast<uint32_t *>(self->mInputFrameBuffer.get() + 8 + paddingControlBytes));
|
||||
promisedID &= 0x7fffffff;
|
||||
}
|
||||
|
||||
@ -1382,7 +1421,7 @@ Http2Session::RecvPushPromise(Http2Session *self)
|
||||
}
|
||||
|
||||
// confirm associated-to
|
||||
nsresult rv = self->SetInputFrameDataStream(associatedID);
|
||||
rv = self->SetInputFrameDataStream(associatedID);
|
||||
if (NS_FAILED(rv))
|
||||
return rv;
|
||||
|
||||
@ -1464,8 +1503,8 @@ Http2Session::RecvPushPromise(Http2Session *self)
|
||||
self->mStreamTransactionHash.Put(transactionBuffer, pushedStream);
|
||||
self->mPushedStreams.AppendElement(pushedStream);
|
||||
|
||||
self->mDecompressBuffer.Append(self->mInputFrameBuffer + 8 + promiseLen,
|
||||
self->mInputFrameDataSize - promiseLen);
|
||||
self->mDecompressBuffer.Append(self->mInputFrameBuffer + 8 + paddingControlBytes + promiseLen,
|
||||
self->mInputFrameDataSize - paddingControlBytes - promiseLen - paddingLength);
|
||||
|
||||
nsAutoCString requestHeaders;
|
||||
rv = pushedStream->ConvertPushHeaders(&self->mDecompressor,
|
||||
@ -1518,9 +1557,11 @@ Http2Session::RecvPushPromise(Http2Session *self)
|
||||
|
||||
static_assert(Http2Stream::kWorstPriority >= 0,
|
||||
"kWorstPriority out of range");
|
||||
uint32_t unsignedPriority = static_cast<uint32_t>(Http2Stream::kWorstPriority);
|
||||
pushedStream->SetPriority(unsignedPriority);
|
||||
self->GeneratePriority(promisedID, unsignedPriority);
|
||||
uint32_t unsignedPriorityGroup = static_cast<uint32_t>(Http2Stream::kWorstPriority);
|
||||
uint8_t priorityGroupWeight = (nsISupportsPriority::PRIORITY_LOWEST + 1) -
|
||||
(Http2Stream::kWorstPriority - Http2Stream::kNormalPriority);
|
||||
pushedStream->SetPriority(unsignedPriorityGroup);
|
||||
self->GeneratePriority(promisedID, unsignedPriorityGroup, priorityGroupWeight);
|
||||
self->ResetDownstreamState();
|
||||
return NS_OK;
|
||||
}
|
||||
@ -1735,7 +1776,8 @@ Http2Session::RecvContinuation(Http2Session *self)
|
||||
|
||||
// continued headers
|
||||
if (self->mExpectedHeaderID) {
|
||||
self->mInputFrameFlags &= ~kFlag_PRIORITY;
|
||||
self->mInputFrameFlags &= ~kFlag_PRIORITY_GROUP;
|
||||
self->mInputFrameFlags &= ~kFlag_PRIORITY_DEPENDENCY;
|
||||
return RecvHeaders(self);
|
||||
}
|
||||
|
||||
@ -1747,6 +1789,18 @@ Http2Session::RecvContinuation(Http2Session *self)
|
||||
return RecvPushPromise(self);
|
||||
}
|
||||
|
||||
nsresult
|
||||
Http2Session::RecvAltSvc(Http2Session *self)
|
||||
{
|
||||
MOZ_ASSERT(self->mInputFrameType == FRAME_TYPE_ALTSVC);
|
||||
LOG3(("Http2Session::RecvAltSvc %p Flags 0x%X id 0x%X\n", self,
|
||||
self->mInputFrameFlags, self->mInputFrameID));
|
||||
|
||||
// For now, we don't do anything with ALTSVC frames
|
||||
self->ResetDownstreamState();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// nsAHttpTransaction. It is expected that nsHttpConnection is the caller
|
||||
// of these methods
|
||||
@ -2081,7 +2135,7 @@ Http2Session::WriteSegments(nsAHttpSegmentWriter *writer,
|
||||
mPaddingLength = 0;
|
||||
if (mInputFrameType == FRAME_TYPE_DATA ||
|
||||
mInputFrameType == FRAME_TYPE_HEADERS ||
|
||||
// TODO: also mInputFrameType == FRAME_TYPE_PUSH_PROMISE after draft10
|
||||
mInputFrameType == FRAME_TYPE_PUSH_PROMISE ||
|
||||
mInputFrameType == FRAME_TYPE_CONTINUATION) {
|
||||
if ((mInputFrameFlags & kFlag_PAD_HIGH) &&
|
||||
!(mInputFrameFlags & kFlag_PAD_LOW)) {
|
||||
|
@ -82,7 +82,8 @@ public:
|
||||
FRAME_TYPE_GOAWAY = 7,
|
||||
FRAME_TYPE_WINDOW_UPDATE = 8,
|
||||
FRAME_TYPE_CONTINUATION = 9,
|
||||
FRAME_TYPE_LAST = 10
|
||||
FRAME_TYPE_ALTSVC = 10,
|
||||
FRAME_TYPE_LAST = 11
|
||||
};
|
||||
|
||||
// NO_ERROR is a macro defined on windows, so we'll name the HTTP2 goaway
|
||||
@ -107,12 +108,13 @@ public:
|
||||
// used on frames other than the comments indicate they MUST be ignored.
|
||||
const static uint8_t kFlag_END_STREAM = 0x01; // data, headers
|
||||
const static uint8_t kFlag_END_HEADERS = 0x04; // headers, continuation
|
||||
const static uint8_t kFlag_PRIORITY = 0x08; //headers
|
||||
const static uint8_t kFlag_END_PUSH_PROMISE = 0x04; // push promise
|
||||
const static uint8_t kFlag_ACK = 0x01; // ping and settings
|
||||
const static uint8_t kFlag_END_SEGMENT = 0x02; // data
|
||||
const static uint8_t kFlag_PAD_LOW = 0x10; // data, headers, continuation
|
||||
const static uint8_t kFlag_PAD_HIGH = 0x20; // data, headers, continuation
|
||||
const static uint8_t kFlag_PAD_LOW = 0x08; // data, headers, push promise, continuation
|
||||
const static uint8_t kFlag_PAD_HIGH = 0x10; // data, headers, push promise, continuation
|
||||
const static uint8_t kFlag_PRIORITY_GROUP = 0x20; // headers, priority
|
||||
const static uint8_t kFlag_PRIORITY_DEPENDENCY = 0x40; // headers, priority
|
||||
|
||||
enum {
|
||||
SETTINGS_TYPE_HEADER_TABLE_SIZE = 1, // compression table size
|
||||
@ -159,6 +161,7 @@ public:
|
||||
static nsresult RecvGoAway(Http2Session *);
|
||||
static nsresult RecvWindowUpdate(Http2Session *);
|
||||
static nsresult RecvContinuation(Http2Session *);
|
||||
static nsresult RecvAltSvc(Http2Session *);
|
||||
|
||||
template<typename T>
|
||||
static void EnsureBuffer(nsAutoArrayPtr<T> &,
|
||||
@ -230,7 +233,7 @@ private:
|
||||
nsresult UncompressAndDiscard();
|
||||
void GeneratePing(bool);
|
||||
void GenerateSettingsAck();
|
||||
void GeneratePriority(uint32_t, uint32_t);
|
||||
void GeneratePriority(uint32_t, uint32_t, uint8_t);
|
||||
void GenerateRstStream(uint32_t, uint32_t);
|
||||
void GenerateGoAway(uint32_t);
|
||||
void CleanupStream(Http2Stream *, nsresult, errorType);
|
||||
|
@ -79,9 +79,9 @@ Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction,
|
||||
|
||||
PR_STATIC_ASSERT(nsISupportsPriority::PRIORITY_LOWEST <= kNormalPriority);
|
||||
|
||||
// values of priority closer to 0 are higher priority for both
|
||||
// mPriority and the priority argument. They are relative but not
|
||||
// proportional.
|
||||
// values of priority closer to 0 are higher priority for the priority
|
||||
// argument. This value is used as a group, which maps to a
|
||||
// weight that is related to the nsISupportsPriority that we are given.
|
||||
int32_t httpPriority;
|
||||
if (priority >= nsISupportsPriority::PRIORITY_LOWEST) {
|
||||
httpPriority = kWorstPriority;
|
||||
@ -91,7 +91,7 @@ Http2Stream::Http2Stream(nsAHttpTransaction *httpTransaction,
|
||||
httpPriority = kNormalPriority + priority;
|
||||
}
|
||||
MOZ_ASSERT(httpPriority >= 0);
|
||||
mPriority = static_cast<uint32_t>(httpPriority);
|
||||
SetPriority(static_cast<uint32_t>(httpPriority));
|
||||
}
|
||||
|
||||
Http2Stream::~Http2Stream()
|
||||
@ -375,7 +375,7 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
|
||||
// Determine whether to put the fin bit on the header frame or whether
|
||||
// to wait for a data packet to put it on.
|
||||
uint8_t firstFrameFlags = Http2Session::kFlag_PRIORITY;
|
||||
uint8_t firstFrameFlags = Http2Session::kFlag_PRIORITY_GROUP;
|
||||
|
||||
if (mTransaction->RequestHead()->IsGet() ||
|
||||
mTransaction->RequestHead()->IsConnect() ||
|
||||
@ -406,7 +406,7 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
MOZ_ASSERT(!mTxInlineFrameUsed);
|
||||
|
||||
uint32_t dataLength = compressedData.Length();
|
||||
uint32_t maxFrameData = Http2Session::kMaxFrameData - 4; // 4 byes for priority
|
||||
uint32_t maxFrameData = Http2Session::kMaxFrameData - 5; // 5 bytes for priority
|
||||
uint32_t numFrames = 1;
|
||||
|
||||
if (dataLength > maxFrameData) {
|
||||
@ -418,8 +418,8 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
// note that we could still have 1 frame for 0 bytes of data. that's ok.
|
||||
|
||||
uint32_t messageSize = dataLength;
|
||||
messageSize += 12; // header frame overhead
|
||||
messageSize += (numFrames - 1) * 8; // continuation frames overhead
|
||||
messageSize += 13; // frame header + priority overhead in HEADERS frame
|
||||
messageSize += (numFrames - 1) * 8; // frame header overhead in CONTINUATION frames
|
||||
|
||||
Http2Session::EnsureBuffer(mTxInlineFrame,
|
||||
dataLength + messageSize,
|
||||
@ -427,8 +427,9 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
mTxInlineFrameSize);
|
||||
|
||||
mTxInlineFrameUsed += messageSize;
|
||||
LOG3(("%p Generating %d bytes of HEADERS for stream 0x%X at priority %u frames %u\n",
|
||||
this, mTxInlineFrameUsed, mStreamID, mPriority, numFrames));
|
||||
LOG3(("%p Generating %d bytes of HEADERS for stream 0x%X with priority group %u weight %u frames %u\n",
|
||||
this, mTxInlineFrameUsed, mStreamID, mPriorityGroup,
|
||||
mPriorityGroupWeight, numFrames));
|
||||
|
||||
uint32_t outputOffset = 0;
|
||||
uint32_t compressedDataOffset = 0;
|
||||
@ -451,15 +452,16 @@ Http2Stream::ParseHttpRequestHeaders(const char *buf,
|
||||
|
||||
mSession->CreateFrameHeader(
|
||||
mTxInlineFrame.get() + outputOffset,
|
||||
frameLen + (idx ? 0 : 4),
|
||||
frameLen + (idx ? 0 : 5),
|
||||
(idx) ? Http2Session::FRAME_TYPE_CONTINUATION : Http2Session::FRAME_TYPE_HEADERS,
|
||||
flags, mStreamID);
|
||||
outputOffset += 8;
|
||||
|
||||
if (!idx) {
|
||||
uint32_t priority = PR_htonl(mPriority);
|
||||
memcpy (mTxInlineFrame.get() + outputOffset, &priority, 4);
|
||||
outputOffset += 4;
|
||||
uint32_t priorityGroup = PR_htonl(mPriorityGroup);
|
||||
memcpy(mTxInlineFrame.get() + outputOffset, &priorityGroup, 4);
|
||||
memcpy(mTxInlineFrame.get() + outputOffset + 4, &mPriorityGroupWeight, 1);
|
||||
outputOffset += 5;
|
||||
}
|
||||
|
||||
memcpy(mTxInlineFrame.get() + outputOffset,
|
||||
@ -581,18 +583,20 @@ Http2Stream::AdjustPushedPriority()
|
||||
|
||||
uint8_t *packet = mTxInlineFrame.get() + mTxInlineFrameUsed;
|
||||
Http2Session::EnsureBuffer(mTxInlineFrame,
|
||||
mTxInlineFrameUsed + 12,
|
||||
mTxInlineFrameUsed + 13,
|
||||
mTxInlineFrameUsed,
|
||||
mTxInlineFrameSize);
|
||||
mTxInlineFrameUsed += 12;
|
||||
mTxInlineFrameUsed += 13;
|
||||
|
||||
mSession->CreateFrameHeader(packet, 4,
|
||||
Http2Session::FRAME_TYPE_PRIORITY, 0,
|
||||
mSession->CreateFrameHeader(packet, 5,
|
||||
Http2Session::FRAME_TYPE_PRIORITY,
|
||||
Http2Session::kFlag_PRIORITY_GROUP,
|
||||
mPushSource->mStreamID);
|
||||
|
||||
uint32_t newPriority = PR_htonl(mPriority);
|
||||
mPushSource->SetPriority(newPriority);
|
||||
mPushSource->SetPriority(mPriorityGroup);
|
||||
uint32_t newPriority = PR_htonl(mPriorityGroup);
|
||||
memcpy(packet + 8, &newPriority, 4);
|
||||
memcpy(packet + 12, &mPriorityGroupWeight, 1);
|
||||
|
||||
LOG3(("AdjustPushedPriority %p id 0x%X to %X\n", this, mPushSource->mStreamID,
|
||||
newPriority));
|
||||
@ -912,9 +916,25 @@ Http2Stream::UpdateServerReceiveWindow(int32_t delta)
|
||||
}
|
||||
|
||||
void
|
||||
Http2Stream::SetPriority(uint32_t newVal)
|
||||
Http2Stream::SetPriority(uint32_t newGroup)
|
||||
{
|
||||
mPriority = std::min(newVal, 0x7fffffffU);
|
||||
int32_t httpPriority = static_cast<int32_t>(newGroup);
|
||||
uint8_t newWeight = (nsISupportsPriority::PRIORITY_LOWEST + 1) -
|
||||
(httpPriority - kNormalPriority);
|
||||
SetPriorityGroup(newGroup, newWeight);
|
||||
}
|
||||
|
||||
void
|
||||
Http2Stream::SetPriorityGroup(uint32_t newGroup, uint8_t newWeight)
|
||||
{
|
||||
mPriorityGroup = newGroup;
|
||||
mPriorityGroupWeight = newWeight;
|
||||
}
|
||||
|
||||
void
|
||||
Http2Stream::SetPriorityDependency(uint32_t newDependency, bool exclusive)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -109,8 +109,10 @@ public:
|
||||
|
||||
bool BlockedOnRwin() { return mBlockedOnRwin; }
|
||||
|
||||
uint32_t Priority() { return mPriority; }
|
||||
uint32_t Priority() { return mPriorityGroup; }
|
||||
void SetPriority(uint32_t);
|
||||
void SetPriorityGroup(uint32_t, uint8_t);
|
||||
void SetPriorityDependency(uint32_t, bool);
|
||||
|
||||
// A pull stream has an implicit sink, a pushed stream has a sink
|
||||
// once it is matched to a pull stream.
|
||||
@ -236,8 +238,8 @@ private:
|
||||
// problems with the google servers.
|
||||
int64_t mRequestBodyLenRemaining;
|
||||
|
||||
// 0 is highest.. up to 2^31 - 1 as lowest
|
||||
uint32_t mPriority;
|
||||
uint32_t mPriorityGroup;
|
||||
uint8_t mPriorityGroupWeight;
|
||||
|
||||
// mClientReceiveWindow, mServerReceiveWindow, and mLocalUnacked are for flow control.
|
||||
// *window are signed because the race conditions in asynchronous SETTINGS
|
||||
|
@ -1,257 +1,257 @@
|
||||
( 0) |11111111|11111111|11110111|010 [27] 7ffffba [27]
|
||||
( 1) |11111111|11111111|11110111|011 [27] 7ffffbb [27]
|
||||
( 2) |11111111|11111111|11110111|100 [27] 7ffffbc [27]
|
||||
( 3) |11111111|11111111|11110111|101 [27] 7ffffbd [27]
|
||||
( 4) |11111111|11111111|11110111|110 [27] 7ffffbe [27]
|
||||
( 5) |11111111|11111111|11110111|111 [27] 7ffffbf [27]
|
||||
( 6) |11111111|11111111|11111000|000 [27] 7ffffc0 [27]
|
||||
( 7) |11111111|11111111|11111000|001 [27] 7ffffc1 [27]
|
||||
( 8) |11111111|11111111|11111000|010 [27] 7ffffc2 [27]
|
||||
( 9) |11111111|11111111|11111000|011 [27] 7ffffc3 [27]
|
||||
( 10) |11111111|11111111|11111000|100 [27] 7ffffc4 [27]
|
||||
( 11) |11111111|11111111|11111000|101 [27] 7ffffc5 [27]
|
||||
( 12) |11111111|11111111|11111000|110 [27] 7ffffc6 [27]
|
||||
( 13) |11111111|11111111|11111000|111 [27] 7ffffc7 [27]
|
||||
( 14) |11111111|11111111|11111001|000 [27] 7ffffc8 [27]
|
||||
( 15) |11111111|11111111|11111001|001 [27] 7ffffc9 [27]
|
||||
( 16) |11111111|11111111|11111001|010 [27] 7ffffca [27]
|
||||
( 17) |11111111|11111111|11111001|011 [27] 7ffffcb [27]
|
||||
( 18) |11111111|11111111|11111001|100 [27] 7ffffcc [27]
|
||||
( 19) |11111111|11111111|11111001|101 [27] 7ffffcd [27]
|
||||
( 20) |11111111|11111111|11111001|110 [27] 7ffffce [27]
|
||||
( 21) |11111111|11111111|11111001|111 [27] 7ffffcf [27]
|
||||
( 22) |11111111|11111111|11111010|000 [27] 7ffffd0 [27]
|
||||
( 23) |11111111|11111111|11111010|001 [27] 7ffffd1 [27]
|
||||
( 24) |11111111|11111111|11111010|010 [27] 7ffffd2 [27]
|
||||
( 25) |11111111|11111111|11111010|011 [27] 7ffffd3 [27]
|
||||
( 26) |11111111|11111111|11111010|100 [27] 7ffffd4 [27]
|
||||
( 27) |11111111|11111111|11111010|101 [27] 7ffffd5 [27]
|
||||
( 28) |11111111|11111111|11111010|110 [27] 7ffffd6 [27]
|
||||
( 29) |11111111|11111111|11111010|111 [27] 7ffffd7 [27]
|
||||
( 30) |11111111|11111111|11111011|000 [27] 7ffffd8 [27]
|
||||
( 31) |11111111|11111111|11111011|001 [27] 7ffffd9 [27]
|
||||
' ' ( 32) |11101000| [8] e8 [8]
|
||||
'!' ( 33) |11111111|1100 [12] ffc [12]
|
||||
'"' ( 34) |11111111|111010 [14] 3ffa [14]
|
||||
'#' ( 35) |11111111|1111100 [15] 7ffc [15]
|
||||
'$' ( 36) |11111111|1111101 [15] 7ffd [15]
|
||||
'%' ( 37) |100100 [6] 24 [6]
|
||||
'&' ( 38) |1101110 [7] 6e [7]
|
||||
''' ( 39) |11111111|1111110 [15] 7ffe [15]
|
||||
'(' ( 40) |11111111|010 [11] 7fa [11]
|
||||
')' ( 41) |11111111|011 [11] 7fb [11]
|
||||
'*' ( 42) |11111110|10 [10] 3fa [10]
|
||||
'+' ( 43) |11111111|100 [11] 7fc [11]
|
||||
',' ( 44) |11101001| [8] e9 [8]
|
||||
'-' ( 45) |100101 [6] 25 [6]
|
||||
'.' ( 46) |00100 [5] 4 [5]
|
||||
'/' ( 47) |0000 [4] 0 [4]
|
||||
'0' ( 48) |00101 [5] 5 [5]
|
||||
'1' ( 49) |00110 [5] 6 [5]
|
||||
'2' ( 50) |00111 [5] 7 [5]
|
||||
'3' ( 51) |100110 [6] 26 [6]
|
||||
'4' ( 52) |100111 [6] 27 [6]
|
||||
'5' ( 53) |101000 [6] 28 [6]
|
||||
'6' ( 54) |101001 [6] 29 [6]
|
||||
'7' ( 55) |101010 [6] 2a [6]
|
||||
'8' ( 56) |101011 [6] 2b [6]
|
||||
'9' ( 57) |101100 [6] 2c [6]
|
||||
':' ( 58) |11110110|0 [9] 1ec [9]
|
||||
';' ( 59) |11101010| [8] ea [8]
|
||||
'<' ( 60) |11111111|11111111|10 [18] 3fffe [18]
|
||||
'=' ( 61) |101101 [6] 2d [6]
|
||||
'>' ( 62) |11111111|11111110|0 [17] 1fffc [17]
|
||||
'?' ( 63) |11110110|1 [9] 1ed [9]
|
||||
'@' ( 64) |11111111|111011 [14] 3ffb [14]
|
||||
'A' ( 65) |1101111 [7] 6f [7]
|
||||
'B' ( 66) |11101011| [8] eb [8]
|
||||
'C' ( 67) |11101100| [8] ec [8]
|
||||
'D' ( 68) |11101101| [8] ed [8]
|
||||
'E' ( 69) |11101110| [8] ee [8]
|
||||
'F' ( 70) |1110000 [7] 70 [7]
|
||||
'G' ( 71) |11110111|0 [9] 1ee [9]
|
||||
'H' ( 72) |11110111|1 [9] 1ef [9]
|
||||
'I' ( 73) |11111000|0 [9] 1f0 [9]
|
||||
'J' ( 74) |11111000|1 [9] 1f1 [9]
|
||||
'K' ( 75) |11111110|11 [10] 3fb [10]
|
||||
'L' ( 76) |11111001|0 [9] 1f2 [9]
|
||||
'M' ( 77) |11101111| [8] ef [8]
|
||||
'N' ( 78) |11111001|1 [9] 1f3 [9]
|
||||
'O' ( 79) |11111010|0 [9] 1f4 [9]
|
||||
'P' ( 80) |11111010|1 [9] 1f5 [9]
|
||||
'Q' ( 81) |11111011|0 [9] 1f6 [9]
|
||||
'R' ( 82) |11111011|1 [9] 1f7 [9]
|
||||
'S' ( 83) |11110000| [8] f0 [8]
|
||||
'T' ( 84) |11110001| [8] f1 [8]
|
||||
'U' ( 85) |11111100|0 [9] 1f8 [9]
|
||||
'V' ( 86) |11111100|1 [9] 1f9 [9]
|
||||
'W' ( 87) |11111101|0 [9] 1fa [9]
|
||||
'X' ( 88) |11111101|1 [9] 1fb [9]
|
||||
'Y' ( 89) |11111110|0 [9] 1fc [9]
|
||||
'Z' ( 90) |11111111|00 [10] 3fc [10]
|
||||
'[' ( 91) |11111111|111100 [14] 3ffc [14]
|
||||
'\' ( 92) |11111111|11111111|11111011|010 [27] 7ffffda [27]
|
||||
']' ( 93) |11111111|11100 [13] 1ffc [13]
|
||||
'^' ( 94) |11111111|111101 [14] 3ffd [14]
|
||||
'_' ( 95) |101110 [6] 2e [6]
|
||||
'`' ( 96) |11111111|11111111|110 [19] 7fffe [19]
|
||||
'a' ( 97) |01000 [5] 8 [5]
|
||||
'b' ( 98) |101111 [6] 2f [6]
|
||||
'c' ( 99) |01001 [5] 9 [5]
|
||||
'd' (100) |110000 [6] 30 [6]
|
||||
'e' (101) |0001 [4] 1 [4]
|
||||
'f' (102) |110001 [6] 31 [6]
|
||||
'g' (103) |110010 [6] 32 [6]
|
||||
'h' (104) |110011 [6] 33 [6]
|
||||
'i' (105) |01010 [5] a [5]
|
||||
'j' (106) |1110001 [7] 71 [7]
|
||||
'k' (107) |1110010 [7] 72 [7]
|
||||
'l' (108) |01011 [5] b [5]
|
||||
'm' (109) |110100 [6] 34 [6]
|
||||
'n' (110) |01100 [5] c [5]
|
||||
'o' (111) |01101 [5] d [5]
|
||||
'p' (112) |01110 [5] e [5]
|
||||
'q' (113) |11110010| [8] f2 [8]
|
||||
'r' (114) |01111 [5] f [5]
|
||||
's' (115) |10000 [5] 10 [5]
|
||||
't' (116) |10001 [5] 11 [5]
|
||||
'u' (117) |110101 [6] 35 [6]
|
||||
'v' (118) |1110011 [7] 73 [7]
|
||||
'w' (119) |110110 [6] 36 [6]
|
||||
'x' (120) |11110011| [8] f3 [8]
|
||||
'y' (121) |11110100| [8] f4 [8]
|
||||
'z' (122) |11110101| [8] f5 [8]
|
||||
'{' (123) |11111111|11111110|1 [17] 1fffd [17]
|
||||
'|' (124) |11111111|101 [11] 7fd [11]
|
||||
'}' (125) |11111111|11111111|0 [17] 1fffe [17]
|
||||
'~' (126) |11111111|1101 [12] ffd [12]
|
||||
(127) |11111111|11111111|11111011|011 [27] 7ffffdb [27]
|
||||
(128) |11111111|11111111|11111011|100 [27] 7ffffdc [27]
|
||||
(129) |11111111|11111111|11111011|101 [27] 7ffffdd [27]
|
||||
(130) |11111111|11111111|11111011|110 [27] 7ffffde [27]
|
||||
(131) |11111111|11111111|11111011|111 [27] 7ffffdf [27]
|
||||
(132) |11111111|11111111|11111100|000 [27] 7ffffe0 [27]
|
||||
(133) |11111111|11111111|11111100|001 [27] 7ffffe1 [27]
|
||||
(134) |11111111|11111111|11111100|010 [27] 7ffffe2 [27]
|
||||
(135) |11111111|11111111|11111100|011 [27] 7ffffe3 [27]
|
||||
(136) |11111111|11111111|11111100|100 [27] 7ffffe4 [27]
|
||||
(137) |11111111|11111111|11111100|101 [27] 7ffffe5 [27]
|
||||
(138) |11111111|11111111|11111100|110 [27] 7ffffe6 [27]
|
||||
(139) |11111111|11111111|11111100|111 [27] 7ffffe7 [27]
|
||||
(140) |11111111|11111111|11111101|000 [27] 7ffffe8 [27]
|
||||
(141) |11111111|11111111|11111101|001 [27] 7ffffe9 [27]
|
||||
(142) |11111111|11111111|11111101|010 [27] 7ffffea [27]
|
||||
(143) |11111111|11111111|11111101|011 [27] 7ffffeb [27]
|
||||
(144) |11111111|11111111|11111101|100 [27] 7ffffec [27]
|
||||
(145) |11111111|11111111|11111101|101 [27] 7ffffed [27]
|
||||
(146) |11111111|11111111|11111101|110 [27] 7ffffee [27]
|
||||
(147) |11111111|11111111|11111101|111 [27] 7ffffef [27]
|
||||
(148) |11111111|11111111|11111110|000 [27] 7fffff0 [27]
|
||||
(149) |11111111|11111111|11111110|001 [27] 7fffff1 [27]
|
||||
(150) |11111111|11111111|11111110|010 [27] 7fffff2 [27]
|
||||
(151) |11111111|11111111|11111110|011 [27] 7fffff3 [27]
|
||||
(152) |11111111|11111111|11111110|100 [27] 7fffff4 [27]
|
||||
(153) |11111111|11111111|11111110|101 [27] 7fffff5 [27]
|
||||
(154) |11111111|11111111|11111110|110 [27] 7fffff6 [27]
|
||||
(155) |11111111|11111111|11111110|111 [27] 7fffff7 [27]
|
||||
(156) |11111111|11111111|11111111|000 [27] 7fffff8 [27]
|
||||
(157) |11111111|11111111|11111111|001 [27] 7fffff9 [27]
|
||||
(158) |11111111|11111111|11111111|010 [27] 7fffffa [27]
|
||||
(159) |11111111|11111111|11111111|011 [27] 7fffffb [27]
|
||||
(160) |11111111|11111111|11111111|100 [27] 7fffffc [27]
|
||||
(161) |11111111|11111111|11111111|101 [27] 7fffffd [27]
|
||||
(162) |11111111|11111111|11111111|110 [27] 7fffffe [27]
|
||||
(163) |11111111|11111111|11111111|111 [27] 7ffffff [27]
|
||||
(164) |11111111|11111111|11100000|00 [26] 3ffff80 [26]
|
||||
(165) |11111111|11111111|11100000|01 [26] 3ffff81 [26]
|
||||
(166) |11111111|11111111|11100000|10 [26] 3ffff82 [26]
|
||||
(167) |11111111|11111111|11100000|11 [26] 3ffff83 [26]
|
||||
(168) |11111111|11111111|11100001|00 [26] 3ffff84 [26]
|
||||
(169) |11111111|11111111|11100001|01 [26] 3ffff85 [26]
|
||||
(170) |11111111|11111111|11100001|10 [26] 3ffff86 [26]
|
||||
(171) |11111111|11111111|11100001|11 [26] 3ffff87 [26]
|
||||
(172) |11111111|11111111|11100010|00 [26] 3ffff88 [26]
|
||||
(173) |11111111|11111111|11100010|01 [26] 3ffff89 [26]
|
||||
(174) |11111111|11111111|11100010|10 [26] 3ffff8a [26]
|
||||
(175) |11111111|11111111|11100010|11 [26] 3ffff8b [26]
|
||||
(176) |11111111|11111111|11100011|00 [26] 3ffff8c [26]
|
||||
(177) |11111111|11111111|11100011|01 [26] 3ffff8d [26]
|
||||
(178) |11111111|11111111|11100011|10 [26] 3ffff8e [26]
|
||||
(179) |11111111|11111111|11100011|11 [26] 3ffff8f [26]
|
||||
(180) |11111111|11111111|11100100|00 [26] 3ffff90 [26]
|
||||
(181) |11111111|11111111|11100100|01 [26] 3ffff91 [26]
|
||||
(182) |11111111|11111111|11100100|10 [26] 3ffff92 [26]
|
||||
(183) |11111111|11111111|11100100|11 [26] 3ffff93 [26]
|
||||
(184) |11111111|11111111|11100101|00 [26] 3ffff94 [26]
|
||||
(185) |11111111|11111111|11100101|01 [26] 3ffff95 [26]
|
||||
(186) |11111111|11111111|11100101|10 [26] 3ffff96 [26]
|
||||
(187) |11111111|11111111|11100101|11 [26] 3ffff97 [26]
|
||||
(188) |11111111|11111111|11100110|00 [26] 3ffff98 [26]
|
||||
(189) |11111111|11111111|11100110|01 [26] 3ffff99 [26]
|
||||
(190) |11111111|11111111|11100110|10 [26] 3ffff9a [26]
|
||||
(191) |11111111|11111111|11100110|11 [26] 3ffff9b [26]
|
||||
(192) |11111111|11111111|11100111|00 [26] 3ffff9c [26]
|
||||
(193) |11111111|11111111|11100111|01 [26] 3ffff9d [26]
|
||||
(194) |11111111|11111111|11100111|10 [26] 3ffff9e [26]
|
||||
(195) |11111111|11111111|11100111|11 [26] 3ffff9f [26]
|
||||
(196) |11111111|11111111|11101000|00 [26] 3ffffa0 [26]
|
||||
(197) |11111111|11111111|11101000|01 [26] 3ffffa1 [26]
|
||||
(198) |11111111|11111111|11101000|10 [26] 3ffffa2 [26]
|
||||
(199) |11111111|11111111|11101000|11 [26] 3ffffa3 [26]
|
||||
(200) |11111111|11111111|11101001|00 [26] 3ffffa4 [26]
|
||||
(201) |11111111|11111111|11101001|01 [26] 3ffffa5 [26]
|
||||
(202) |11111111|11111111|11101001|10 [26] 3ffffa6 [26]
|
||||
(203) |11111111|11111111|11101001|11 [26] 3ffffa7 [26]
|
||||
(204) |11111111|11111111|11101010|00 [26] 3ffffa8 [26]
|
||||
(205) |11111111|11111111|11101010|01 [26] 3ffffa9 [26]
|
||||
(206) |11111111|11111111|11101010|10 [26] 3ffffaa [26]
|
||||
(207) |11111111|11111111|11101010|11 [26] 3ffffab [26]
|
||||
(208) |11111111|11111111|11101011|00 [26] 3ffffac [26]
|
||||
(209) |11111111|11111111|11101011|01 [26] 3ffffad [26]
|
||||
(210) |11111111|11111111|11101011|10 [26] 3ffffae [26]
|
||||
(211) |11111111|11111111|11101011|11 [26] 3ffffaf [26]
|
||||
(212) |11111111|11111111|11101100|00 [26] 3ffffb0 [26]
|
||||
(213) |11111111|11111111|11101100|01 [26] 3ffffb1 [26]
|
||||
(214) |11111111|11111111|11101100|10 [26] 3ffffb2 [26]
|
||||
(215) |11111111|11111111|11101100|11 [26] 3ffffb3 [26]
|
||||
(216) |11111111|11111111|11101101|00 [26] 3ffffb4 [26]
|
||||
(217) |11111111|11111111|11101101|01 [26] 3ffffb5 [26]
|
||||
(218) |11111111|11111111|11101101|10 [26] 3ffffb6 [26]
|
||||
(219) |11111111|11111111|11101101|11 [26] 3ffffb7 [26]
|
||||
(220) |11111111|11111111|11101110|00 [26] 3ffffb8 [26]
|
||||
(221) |11111111|11111111|11101110|01 [26] 3ffffb9 [26]
|
||||
(222) |11111111|11111111|11101110|10 [26] 3ffffba [26]
|
||||
(223) |11111111|11111111|11101110|11 [26] 3ffffbb [26]
|
||||
(224) |11111111|11111111|11101111|00 [26] 3ffffbc [26]
|
||||
(225) |11111111|11111111|11101111|01 [26] 3ffffbd [26]
|
||||
(226) |11111111|11111111|11101111|10 [26] 3ffffbe [26]
|
||||
(227) |11111111|11111111|11101111|11 [26] 3ffffbf [26]
|
||||
(228) |11111111|11111111|11110000|00 [26] 3ffffc0 [26]
|
||||
(229) |11111111|11111111|11110000|01 [26] 3ffffc1 [26]
|
||||
(230) |11111111|11111111|11110000|10 [26] 3ffffc2 [26]
|
||||
(231) |11111111|11111111|11110000|11 [26] 3ffffc3 [26]
|
||||
(232) |11111111|11111111|11110001|00 [26] 3ffffc4 [26]
|
||||
(233) |11111111|11111111|11110001|01 [26] 3ffffc5 [26]
|
||||
(234) |11111111|11111111|11110001|10 [26] 3ffffc6 [26]
|
||||
(235) |11111111|11111111|11110001|11 [26] 3ffffc7 [26]
|
||||
(236) |11111111|11111111|11110010|00 [26] 3ffffc8 [26]
|
||||
(237) |11111111|11111111|11110010|01 [26] 3ffffc9 [26]
|
||||
(238) |11111111|11111111|11110010|10 [26] 3ffffca [26]
|
||||
(239) |11111111|11111111|11110010|11 [26] 3ffffcb [26]
|
||||
(240) |11111111|11111111|11110011|00 [26] 3ffffcc [26]
|
||||
(241) |11111111|11111111|11110011|01 [26] 3ffffcd [26]
|
||||
(242) |11111111|11111111|11110011|10 [26] 3ffffce [26]
|
||||
(243) |11111111|11111111|11110011|11 [26] 3ffffcf [26]
|
||||
(244) |11111111|11111111|11110100|00 [26] 3ffffd0 [26]
|
||||
(245) |11111111|11111111|11110100|01 [26] 3ffffd1 [26]
|
||||
(246) |11111111|11111111|11110100|10 [26] 3ffffd2 [26]
|
||||
(247) |11111111|11111111|11110100|11 [26] 3ffffd3 [26]
|
||||
(248) |11111111|11111111|11110101|00 [26] 3ffffd4 [26]
|
||||
(249) |11111111|11111111|11110101|01 [26] 3ffffd5 [26]
|
||||
(250) |11111111|11111111|11110101|10 [26] 3ffffd6 [26]
|
||||
(251) |11111111|11111111|11110101|11 [26] 3ffffd7 [26]
|
||||
(252) |11111111|11111111|11110110|00 [26] 3ffffd8 [26]
|
||||
(253) |11111111|11111111|11110110|01 [26] 3ffffd9 [26]
|
||||
(254) |11111111|11111111|11110110|10 [26] 3ffffda [26]
|
||||
(255) |11111111|11111111|11110110|11 [26] 3ffffdb [26]
|
||||
EOS (256) |11111111|11111111|11110111|00 [26] 3ffffdc [26]
|
||||
( 0) |11111111|11111111|11101110|10 3ffffba [26]
|
||||
( 1) |11111111|11111111|11101110|11 3ffffbb [26]
|
||||
( 2) |11111111|11111111|11101111|00 3ffffbc [26]
|
||||
( 3) |11111111|11111111|11101111|01 3ffffbd [26]
|
||||
( 4) |11111111|11111111|11101111|10 3ffffbe [26]
|
||||
( 5) |11111111|11111111|11101111|11 3ffffbf [26]
|
||||
( 6) |11111111|11111111|11110000|00 3ffffc0 [26]
|
||||
( 7) |11111111|11111111|11110000|01 3ffffc1 [26]
|
||||
( 8) |11111111|11111111|11110000|10 3ffffc2 [26]
|
||||
( 9) |11111111|11111111|11110000|11 3ffffc3 [26]
|
||||
( 10) |11111111|11111111|11110001|00 3ffffc4 [26]
|
||||
( 11) |11111111|11111111|11110001|01 3ffffc5 [26]
|
||||
( 12) |11111111|11111111|11110001|10 3ffffc6 [26]
|
||||
( 13) |11111111|11111111|11110001|11 3ffffc7 [26]
|
||||
( 14) |11111111|11111111|11110010|00 3ffffc8 [26]
|
||||
( 15) |11111111|11111111|11110010|01 3ffffc9 [26]
|
||||
( 16) |11111111|11111111|11110010|10 3ffffca [26]
|
||||
( 17) |11111111|11111111|11110010|11 3ffffcb [26]
|
||||
( 18) |11111111|11111111|11110011|00 3ffffcc [26]
|
||||
( 19) |11111111|11111111|11110011|01 3ffffcd [26]
|
||||
( 20) |11111111|11111111|11110011|10 3ffffce [26]
|
||||
( 21) |11111111|11111111|11110011|11 3ffffcf [26]
|
||||
( 22) |11111111|11111111|11110100|00 3ffffd0 [26]
|
||||
( 23) |11111111|11111111|11110100|01 3ffffd1 [26]
|
||||
( 24) |11111111|11111111|11110100|10 3ffffd2 [26]
|
||||
( 25) |11111111|11111111|11110100|11 3ffffd3 [26]
|
||||
( 26) |11111111|11111111|11110101|00 3ffffd4 [26]
|
||||
( 27) |11111111|11111111|11110101|01 3ffffd5 [26]
|
||||
( 28) |11111111|11111111|11110101|10 3ffffd6 [26]
|
||||
( 29) |11111111|11111111|11110101|11 3ffffd7 [26]
|
||||
( 30) |11111111|11111111|11110110|00 3ffffd8 [26]
|
||||
( 31) |11111111|11111111|11110110|01 3ffffd9 [26]
|
||||
' ' ( 32) |00110 6 [ 5]
|
||||
'!' ( 33) |11111111|11100 1ffc [13]
|
||||
'"' ( 34) |11111000|0 1f0 [ 9]
|
||||
'#' ( 35) |11111111|111100 3ffc [14]
|
||||
'$' ( 36) |11111111|1111100 7ffc [15]
|
||||
'%' ( 37) |011110 1e [ 6]
|
||||
'&' ( 38) |1100100 64 [ 7]
|
||||
''' ( 39) |11111111|11101 1ffd [13]
|
||||
'(' ( 40) |11111110|10 3fa [10]
|
||||
')' ( 41) |11111000|1 1f1 [ 9]
|
||||
'*' ( 42) |11111110|11 3fb [10]
|
||||
'+' ( 43) |11111111|00 3fc [10]
|
||||
',' ( 44) |1100101 65 [ 7]
|
||||
'-' ( 45) |1100110 66 [ 7]
|
||||
'.' ( 46) |011111 1f [ 6]
|
||||
'/' ( 47) |00111 7 [ 5]
|
||||
'0' ( 48) |0000 0 [ 4]
|
||||
'1' ( 49) |0001 1 [ 4]
|
||||
'2' ( 50) |0010 2 [ 4]
|
||||
'3' ( 51) |01000 8 [ 5]
|
||||
'4' ( 52) |100000 20 [ 6]
|
||||
'5' ( 53) |100001 21 [ 6]
|
||||
'6' ( 54) |100010 22 [ 6]
|
||||
'7' ( 55) |100011 23 [ 6]
|
||||
'8' ( 56) |100100 24 [ 6]
|
||||
'9' ( 57) |100101 25 [ 6]
|
||||
':' ( 58) |100110 26 [ 6]
|
||||
';' ( 59) |11101100| ec [ 8]
|
||||
'<' ( 60) |11111111|11111110|0 1fffc [17]
|
||||
'=' ( 61) |100111 27 [ 6]
|
||||
'>' ( 62) |11111111|1111101 7ffd [15]
|
||||
'?' ( 63) |11111111|01 3fd [10]
|
||||
'@' ( 64) |11111111|1111110 7ffe [15]
|
||||
'A' ( 65) |1100111 67 [ 7]
|
||||
'B' ( 66) |11101101| ed [ 8]
|
||||
'C' ( 67) |11101110| ee [ 8]
|
||||
'D' ( 68) |1101000 68 [ 7]
|
||||
'E' ( 69) |11101111| ef [ 8]
|
||||
'F' ( 70) |1101001 69 [ 7]
|
||||
'G' ( 71) |1101010 6a [ 7]
|
||||
'H' ( 72) |11111001|0 1f2 [ 9]
|
||||
'I' ( 73) |11110000| f0 [ 8]
|
||||
'J' ( 74) |11111001|1 1f3 [ 9]
|
||||
'K' ( 75) |11111010|0 1f4 [ 9]
|
||||
'L' ( 76) |11111010|1 1f5 [ 9]
|
||||
'M' ( 77) |1101011 6b [ 7]
|
||||
'N' ( 78) |1101100 6c [ 7]
|
||||
'O' ( 79) |11110001| f1 [ 8]
|
||||
'P' ( 80) |11110010| f2 [ 8]
|
||||
'Q' ( 81) |11111011|0 1f6 [ 9]
|
||||
'R' ( 82) |11111011|1 1f7 [ 9]
|
||||
'S' ( 83) |1101101 6d [ 7]
|
||||
'T' ( 84) |101000 28 [ 6]
|
||||
'U' ( 85) |11110011| f3 [ 8]
|
||||
'V' ( 86) |11111100|0 1f8 [ 9]
|
||||
'W' ( 87) |11111100|1 1f9 [ 9]
|
||||
'X' ( 88) |11110100| f4 [ 8]
|
||||
'Y' ( 89) |11111101|0 1fa [ 9]
|
||||
'Z' ( 90) |11111101|1 1fb [ 9]
|
||||
'[' ( 91) |11111111|100 7fc [11]
|
||||
'\' ( 92) |11111111|11111111|11110110|10 3ffffda [26]
|
||||
']' ( 93) |11111111|101 7fd [11]
|
||||
'^' ( 94) |11111111|111101 3ffd [14]
|
||||
'_' ( 95) |1101110 6e [ 7]
|
||||
'`' ( 96) |11111111|11111111|10 3fffe [18]
|
||||
'a' ( 97) |01001 9 [ 5]
|
||||
'b' ( 98) |1101111 6f [ 7]
|
||||
'c' ( 99) |01010 a [ 5]
|
||||
'd' (100) |101001 29 [ 6]
|
||||
'e' (101) |01011 b [ 5]
|
||||
'f' (102) |1110000 70 [ 7]
|
||||
'g' (103) |101010 2a [ 6]
|
||||
'h' (104) |101011 2b [ 6]
|
||||
'i' (105) |01100 c [ 5]
|
||||
'j' (106) |11110101| f5 [ 8]
|
||||
'k' (107) |11110110| f6 [ 8]
|
||||
'l' (108) |101100 2c [ 6]
|
||||
'm' (109) |101101 2d [ 6]
|
||||
'n' (110) |101110 2e [ 6]
|
||||
'o' (111) |01101 d [ 5]
|
||||
'p' (112) |101111 2f [ 6]
|
||||
'q' (113) |11111110|0 1fc [ 9]
|
||||
'r' (114) |110000 30 [ 6]
|
||||
's' (115) |110001 31 [ 6]
|
||||
't' (116) |01110 e [ 5]
|
||||
'u' (117) |1110001 71 [ 7]
|
||||
'v' (118) |1110010 72 [ 7]
|
||||
'w' (119) |1110011 73 [ 7]
|
||||
'x' (120) |1110100 74 [ 7]
|
||||
'y' (121) |1110101 75 [ 7]
|
||||
'z' (122) |11110111| f7 [ 8]
|
||||
'{' (123) |11111111|11111110|1 1fffd [17]
|
||||
'|' (124) |11111111|1100 ffc [12]
|
||||
'}' (125) |11111111|11111111|0 1fffe [17]
|
||||
'~' (126) |11111111|1101 ffd [12]
|
||||
(127) |11111111|11111111|11110110|11 3ffffdb [26]
|
||||
(128) |11111111|11111111|11110111|00 3ffffdc [26]
|
||||
(129) |11111111|11111111|11110111|01 3ffffdd [26]
|
||||
(130) |11111111|11111111|11110111|10 3ffffde [26]
|
||||
(131) |11111111|11111111|11110111|11 3ffffdf [26]
|
||||
(132) |11111111|11111111|11111000|00 3ffffe0 [26]
|
||||
(133) |11111111|11111111|11111000|01 3ffffe1 [26]
|
||||
(134) |11111111|11111111|11111000|10 3ffffe2 [26]
|
||||
(135) |11111111|11111111|11111000|11 3ffffe3 [26]
|
||||
(136) |11111111|11111111|11111001|00 3ffffe4 [26]
|
||||
(137) |11111111|11111111|11111001|01 3ffffe5 [26]
|
||||
(138) |11111111|11111111|11111001|10 3ffffe6 [26]
|
||||
(139) |11111111|11111111|11111001|11 3ffffe7 [26]
|
||||
(140) |11111111|11111111|11111010|00 3ffffe8 [26]
|
||||
(141) |11111111|11111111|11111010|01 3ffffe9 [26]
|
||||
(142) |11111111|11111111|11111010|10 3ffffea [26]
|
||||
(143) |11111111|11111111|11111010|11 3ffffeb [26]
|
||||
(144) |11111111|11111111|11111011|00 3ffffec [26]
|
||||
(145) |11111111|11111111|11111011|01 3ffffed [26]
|
||||
(146) |11111111|11111111|11111011|10 3ffffee [26]
|
||||
(147) |11111111|11111111|11111011|11 3ffffef [26]
|
||||
(148) |11111111|11111111|11111100|00 3fffff0 [26]
|
||||
(149) |11111111|11111111|11111100|01 3fffff1 [26]
|
||||
(150) |11111111|11111111|11111100|10 3fffff2 [26]
|
||||
(151) |11111111|11111111|11111100|11 3fffff3 [26]
|
||||
(152) |11111111|11111111|11111101|00 3fffff4 [26]
|
||||
(153) |11111111|11111111|11111101|01 3fffff5 [26]
|
||||
(154) |11111111|11111111|11111101|10 3fffff6 [26]
|
||||
(155) |11111111|11111111|11111101|11 3fffff7 [26]
|
||||
(156) |11111111|11111111|11111110|00 3fffff8 [26]
|
||||
(157) |11111111|11111111|11111110|01 3fffff9 [26]
|
||||
(158) |11111111|11111111|11111110|10 3fffffa [26]
|
||||
(159) |11111111|11111111|11111110|11 3fffffb [26]
|
||||
(160) |11111111|11111111|11111111|00 3fffffc [26]
|
||||
(161) |11111111|11111111|11111111|01 3fffffd [26]
|
||||
(162) |11111111|11111111|11111111|10 3fffffe [26]
|
||||
(163) |11111111|11111111|11111111|11 3ffffff [26]
|
||||
(164) |11111111|11111111|11000000|0 1ffff80 [25]
|
||||
(165) |11111111|11111111|11000000|1 1ffff81 [25]
|
||||
(166) |11111111|11111111|11000001|0 1ffff82 [25]
|
||||
(167) |11111111|11111111|11000001|1 1ffff83 [25]
|
||||
(168) |11111111|11111111|11000010|0 1ffff84 [25]
|
||||
(169) |11111111|11111111|11000010|1 1ffff85 [25]
|
||||
(170) |11111111|11111111|11000011|0 1ffff86 [25]
|
||||
(171) |11111111|11111111|11000011|1 1ffff87 [25]
|
||||
(172) |11111111|11111111|11000100|0 1ffff88 [25]
|
||||
(173) |11111111|11111111|11000100|1 1ffff89 [25]
|
||||
(174) |11111111|11111111|11000101|0 1ffff8a [25]
|
||||
(175) |11111111|11111111|11000101|1 1ffff8b [25]
|
||||
(176) |11111111|11111111|11000110|0 1ffff8c [25]
|
||||
(177) |11111111|11111111|11000110|1 1ffff8d [25]
|
||||
(178) |11111111|11111111|11000111|0 1ffff8e [25]
|
||||
(179) |11111111|11111111|11000111|1 1ffff8f [25]
|
||||
(180) |11111111|11111111|11001000|0 1ffff90 [25]
|
||||
(181) |11111111|11111111|11001000|1 1ffff91 [25]
|
||||
(182) |11111111|11111111|11001001|0 1ffff92 [25]
|
||||
(183) |11111111|11111111|11001001|1 1ffff93 [25]
|
||||
(184) |11111111|11111111|11001010|0 1ffff94 [25]
|
||||
(185) |11111111|11111111|11001010|1 1ffff95 [25]
|
||||
(186) |11111111|11111111|11001011|0 1ffff96 [25]
|
||||
(187) |11111111|11111111|11001011|1 1ffff97 [25]
|
||||
(188) |11111111|11111111|11001100|0 1ffff98 [25]
|
||||
(189) |11111111|11111111|11001100|1 1ffff99 [25]
|
||||
(190) |11111111|11111111|11001101|0 1ffff9a [25]
|
||||
(191) |11111111|11111111|11001101|1 1ffff9b [25]
|
||||
(192) |11111111|11111111|11001110|0 1ffff9c [25]
|
||||
(193) |11111111|11111111|11001110|1 1ffff9d [25]
|
||||
(194) |11111111|11111111|11001111|0 1ffff9e [25]
|
||||
(195) |11111111|11111111|11001111|1 1ffff9f [25]
|
||||
(196) |11111111|11111111|11010000|0 1ffffa0 [25]
|
||||
(197) |11111111|11111111|11010000|1 1ffffa1 [25]
|
||||
(198) |11111111|11111111|11010001|0 1ffffa2 [25]
|
||||
(199) |11111111|11111111|11010001|1 1ffffa3 [25]
|
||||
(200) |11111111|11111111|11010010|0 1ffffa4 [25]
|
||||
(201) |11111111|11111111|11010010|1 1ffffa5 [25]
|
||||
(202) |11111111|11111111|11010011|0 1ffffa6 [25]
|
||||
(203) |11111111|11111111|11010011|1 1ffffa7 [25]
|
||||
(204) |11111111|11111111|11010100|0 1ffffa8 [25]
|
||||
(205) |11111111|11111111|11010100|1 1ffffa9 [25]
|
||||
(206) |11111111|11111111|11010101|0 1ffffaa [25]
|
||||
(207) |11111111|11111111|11010101|1 1ffffab [25]
|
||||
(208) |11111111|11111111|11010110|0 1ffffac [25]
|
||||
(209) |11111111|11111111|11010110|1 1ffffad [25]
|
||||
(210) |11111111|11111111|11010111|0 1ffffae [25]
|
||||
(211) |11111111|11111111|11010111|1 1ffffaf [25]
|
||||
(212) |11111111|11111111|11011000|0 1ffffb0 [25]
|
||||
(213) |11111111|11111111|11011000|1 1ffffb1 [25]
|
||||
(214) |11111111|11111111|11011001|0 1ffffb2 [25]
|
||||
(215) |11111111|11111111|11011001|1 1ffffb3 [25]
|
||||
(216) |11111111|11111111|11011010|0 1ffffb4 [25]
|
||||
(217) |11111111|11111111|11011010|1 1ffffb5 [25]
|
||||
(218) |11111111|11111111|11011011|0 1ffffb6 [25]
|
||||
(219) |11111111|11111111|11011011|1 1ffffb7 [25]
|
||||
(220) |11111111|11111111|11011100|0 1ffffb8 [25]
|
||||
(221) |11111111|11111111|11011100|1 1ffffb9 [25]
|
||||
(222) |11111111|11111111|11011101|0 1ffffba [25]
|
||||
(223) |11111111|11111111|11011101|1 1ffffbb [25]
|
||||
(224) |11111111|11111111|11011110|0 1ffffbc [25]
|
||||
(225) |11111111|11111111|11011110|1 1ffffbd [25]
|
||||
(226) |11111111|11111111|11011111|0 1ffffbe [25]
|
||||
(227) |11111111|11111111|11011111|1 1ffffbf [25]
|
||||
(228) |11111111|11111111|11100000|0 1ffffc0 [25]
|
||||
(229) |11111111|11111111|11100000|1 1ffffc1 [25]
|
||||
(230) |11111111|11111111|11100001|0 1ffffc2 [25]
|
||||
(231) |11111111|11111111|11100001|1 1ffffc3 [25]
|
||||
(232) |11111111|11111111|11100010|0 1ffffc4 [25]
|
||||
(233) |11111111|11111111|11100010|1 1ffffc5 [25]
|
||||
(234) |11111111|11111111|11100011|0 1ffffc6 [25]
|
||||
(235) |11111111|11111111|11100011|1 1ffffc7 [25]
|
||||
(236) |11111111|11111111|11100100|0 1ffffc8 [25]
|
||||
(237) |11111111|11111111|11100100|1 1ffffc9 [25]
|
||||
(238) |11111111|11111111|11100101|0 1ffffca [25]
|
||||
(239) |11111111|11111111|11100101|1 1ffffcb [25]
|
||||
(240) |11111111|11111111|11100110|0 1ffffcc [25]
|
||||
(241) |11111111|11111111|11100110|1 1ffffcd [25]
|
||||
(242) |11111111|11111111|11100111|0 1ffffce [25]
|
||||
(243) |11111111|11111111|11100111|1 1ffffcf [25]
|
||||
(244) |11111111|11111111|11101000|0 1ffffd0 [25]
|
||||
(245) |11111111|11111111|11101000|1 1ffffd1 [25]
|
||||
(246) |11111111|11111111|11101001|0 1ffffd2 [25]
|
||||
(247) |11111111|11111111|11101001|1 1ffffd3 [25]
|
||||
(248) |11111111|11111111|11101010|0 1ffffd4 [25]
|
||||
(249) |11111111|11111111|11101010|1 1ffffd5 [25]
|
||||
(250) |11111111|11111111|11101011|0 1ffffd6 [25]
|
||||
(251) |11111111|11111111|11101011|1 1ffffd7 [25]
|
||||
(252) |11111111|11111111|11101100|0 1ffffd8 [25]
|
||||
(253) |11111111|11111111|11101100|1 1ffffd9 [25]
|
||||
(254) |11111111|11111111|11101101|0 1ffffda [25]
|
||||
(255) |11111111|11111111|11101101|1 1ffffdb [25]
|
||||
EOS (256) |11111111|11111111|11101110|0 1ffffdc [25]
|
||||
|
@ -21,11 +21,12 @@ for line in sys.stdin:
|
||||
obracket = line.rfind('[')
|
||||
nbits = int(line[obracket + 1:-1])
|
||||
|
||||
ascii = int(line[10:13].strip())
|
||||
oparen = line.find(' (')
|
||||
ascii = int(line[oparen + 2:oparen + 5].strip())
|
||||
|
||||
bar = line.find('|', 9)
|
||||
obracket = line.find('[', bar)
|
||||
bpat = line[bar + 1:obracket - 1].strip().rstrip('|')
|
||||
bar = line.find('|', oparen)
|
||||
space = line.find(' ', bar)
|
||||
bpat = line[bar + 1:space].strip().rstrip('|')
|
||||
|
||||
characters.append({'ascii': ascii, 'nbits': nbits, 'bpat': bpat})
|
||||
|
||||
|
@ -29,12 +29,11 @@ for line in sys.stdin:
|
||||
obracket = line.rfind('[')
|
||||
nbits = int(line[obracket + 1:-1])
|
||||
|
||||
encend = obracket - 1
|
||||
hexits = nbits / 4
|
||||
if hexits * 4 != nbits:
|
||||
hexits += 1
|
||||
lastbar = line.rfind('|')
|
||||
space = line.find(' ', lastbar)
|
||||
encend = line.rfind(' ', 0, obracket)
|
||||
|
||||
enc = line[encend - hexits:encend]
|
||||
enc = line[space:encend].strip()
|
||||
val = int(enc, 16)
|
||||
|
||||
entries.append({'length': nbits, 'value': val})
|
||||
|
@ -33,14 +33,14 @@ namespace net {
|
||||
// 24 was a internal spdy/3.1
|
||||
// 25 was spdy/4a2
|
||||
// 26 was http/2-draft08 and http/2-draft07 (they were the same)
|
||||
// 27 was also http/2-draft09
|
||||
HTTP2_VERSION_DRAFT10 = 27
|
||||
// 27 was also http/2-draft09 and h2-10
|
||||
HTTP2_VERSION_DRAFT11 = 27
|
||||
};
|
||||
|
||||
typedef uint8_t nsHttpVersion;
|
||||
|
||||
#define NS_HTTP2_DRAFT_VERSION HTTP2_VERSION_DRAFT10
|
||||
#define NS_HTTP2_DRAFT_TOKEN "h2-10"
|
||||
#define NS_HTTP2_DRAFT_VERSION HTTP2_VERSION_DRAFT11
|
||||
#define NS_HTTP2_DRAFT_TOKEN "h2-11"
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// http connection capabilities
|
||||
|
Loading…
Reference in New Issue
Block a user