You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pekko.apache.org by fa...@apache.org on 2024/04/20 08:58:37 UTC
(pekko-http) branch main updated: use ByteStringInputStream (#540)
This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-http.git
The following commit(s) were added to refs/heads/main by this push:
new 355eb90e8 use ByteStringInputStream (#540)
355eb90e8 is described below
commit 355eb90e812b7323cda4d12d6743cfadba1025f5
Author: PJ Fanning <pj...@users.noreply.github.com>
AuthorDate: Sat Apr 20 10:58:32 2024 +0200
use ByteStringInputStream (#540)
Update Http2FrameHpackSupport.scala
Update Http2FrameHpackSupport.scala
---
.../apache/pekko/http/impl/engine/http2/Http2FrameHpackSupport.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2FrameHpackSupport.scala b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2FrameHpackSupport.scala
index 8134e97fe..54d94c444 100644
--- a/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2FrameHpackSupport.scala
+++ b/http2-tests/src/test/scala/org/apache/pekko/http/impl/engine/http2/Http2FrameHpackSupport.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.http.impl.engine.http2
import org.apache.pekko
+import pekko.http.impl.engine.http2.hpack.ByteStringInputStream
import pekko.http.scaladsl.model.headers.RawHeader
import pekko.http.scaladsl.model._
import pekko.http.shaded.com.twitter.hpack._
@@ -22,7 +23,6 @@ import pekko.stream.scaladsl.Source
import pekko.util.ByteString
import org.scalatest.concurrent.ScalaFutures
-import java.io.ByteArrayInputStream
import scala.collection.immutable.VectorBuilder
/** Helper that allows automatic HPACK encoding/decoding for wire sends / expectations */
@@ -58,7 +58,7 @@ trait Http2FrameHpackSupport extends Http2FrameProbeDelegator with Http2FrameSen
val decoder = new Decoder(Http2Protocol.InitialMaxHeaderListSize, Http2Protocol.InitialMaxHeaderTableSize)
def decodeHeaders(bytes: ByteString): Seq[(String, String)] = {
- val bis = new ByteArrayInputStream(bytes.toArrayUnsafe())
+ val bis = ByteStringInputStream(bytes)
val hs = new VectorBuilder[(String, String)]()
decoder.decode(bis,
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pekko.apache.org
For additional commands, e-mail: commits-help@pekko.apache.org