Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 1f32068

Browse files
committed
feat(HPACK.decode): HPACK decoder based on rfc7451
1 parent 956e8b7 commit 1f32068

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

‎.classpath‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@
22
<classpath>
33
<classpathentry kind="src" path="src/test"/>
44
<classpathentry kind="src" path="src/main"/>
5-
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
6-
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/4"/>
5+
<classpathentry kind="src" path="src/res"/>
6+
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.8/"/>
7+
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
78
<classpathentry kind="output" path="bin"/>
89
</classpath>

‎.project‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@
66
</projects>
77
<buildSpec>
88
<buildCommand>
9-
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
9+
<name>org.eclipse.jdt.core.javabuilder</name>
1010
<arguments>
1111
</arguments>
1212
</buildCommand>
1313
<buildCommand>
14-
<name>org.eclipse.jdt.core.javabuilder</name>
14+
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
1515
<arguments>
1616
</arguments>
1717
</buildCommand>

‎src/main/com/aniakanl/http2/frame/HeadersFrame.java‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import java.util.Arrays;
44
import java.util.EnumSet;
55

6+
import com.aniakanl.hpack.HPACK;
67
import com.aniakanl.http2.HTTP2ErrorCode;
78
import com.aniakanl.http2.HTTP2Exception;
89
import com.aniakanl.utils.Utils;
@@ -155,14 +156,16 @@ public static HeadersFrame parse(byte[] frameBody, FrameHeader header) throws HT
155156
headerFrame.setStreamIdentifier(headerFrame.getStreamIdentifier() & 0x7FFFFFFFL);
156157

157158
if (headerFrame.isExclusive == true) {
158-
headerFrame.setWeight((int) frameBody[paramIndex]);
159+
headerFrame.setWeight( (frameBody[paramIndex] & 0xFF) +1);
159160
paramIndex += 1;
160161
}
161162

162163
}
163164

164165
headerFrame.setHeaderBlock(
165166
Arrays.copyOfRange(frameBody, paramIndex, (header.getLength() - headerFrame.getPadLength())));
167+
168+
//HPACK.decode( headerFrame.getHeaderBlock());
166169

167170
if (headerFrame.getPadLength() > 0) {
168171
paramIndex = (header.getLength() - headerFrame.getPadLength()) + 1;

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /