Uploaded image for project: 'HttpComponents HttpCore'
  1. HttpComponents HttpCore
  2. HTTPCORE-704

CharsetDecoder exception

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.1.2, 5.2-alpha2
    • 5.1.3, 5.2-beta1
    • None
    • None
    • OpenJDK 64-Bit Server VM Temurin-11.0.13+8

    Description

      When trying to download a file from https://lei.kdpw.pl/DownloadCFFull.aspx using async client I get an exception:

      java.lang.IllegalStateException: Current state = RESET, new state = FLUSHED
      	at java.base/java.nio.charset.CharsetDecoder.throwIllegalStateException(CharsetDecoder.java:989)
      	at java.base/java.nio.charset.CharsetDecoder.flush(CharsetDecoder.java:672)
      	at org.apache.hc.core5.http2.hpack.HPackDecoder.decodeString(HPackDecoder.java:211)
      	at org.apache.hc.core5.http2.hpack.HPackDecoder.decodeLiteralHeader(HPackDecoder.java:242)
      	at org.apache.hc.core5.http2.hpack.HPackDecoder.decodeHPackHeader(HPackDecoder.java:273)
      	at org.apache.hc.core5.http2.hpack.HPackDecoder.decodeHeaders(HPackDecoder.java:297)
      	at org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.decodeHeaders(AbstractH2StreamMultiplexer.java:1052)
      	at org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.consumeHeaderFrame(AbstractH2StreamMultiplexer.java:1067)
      	at org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.consumeFrame(AbstractH2StreamMultiplexer.java:770)
      	at org.apache.hc.core5.http2.impl.nio.AbstractH2StreamMultiplexer.onInput(AbstractH2StreamMultiplexer.java:444)
      	at org.apache.hc.core5.http2.impl.nio.AbstractH2IOEventHandler.inputReady(AbstractH2IOEventHandler.java:65)
      	at org.apache.hc.core5.http2.impl.nio.ClientH2IOEventHandler.inputReady(ClientH2IOEventHandler.java:39)
      	at org.apache.hc.client5.http.impl.async.LoggingIOSession$1.inputReady(LoggingIOSession.java:238)
      	at org.apache.hc.core5.reactor.ssl.SSLIOSession.decryptData(SSLIOSession.java:549)
      	at org.apache.hc.core5.reactor.ssl.SSLIOSession.access$400(SSLIOSession.java:72)
      	at org.apache.hc.core5.reactor.ssl.SSLIOSession$1.inputReady(SSLIOSession.java:172)
      	at org.apache.hc.core5.reactor.InternalDataChannel.onIOEvent(InternalDataChannel.java:131)
      	at org.apache.hc.core5.reactor.InternalChannel.handleIOEvent(InternalChannel.java:51)
      	at org.apache.hc.core5.reactor.SingleCoreIOReactor.processEvents(SingleCoreIOReactor.java:178)
      	at org.apache.hc.core5.reactor.SingleCoreIOReactor.doExecute(SingleCoreIOReactor.java:127)
      	at org.apache.hc.core5.reactor.AbstractSingleCoreIOReactor.execute(AbstractSingleCoreIOReactor.java:85)
      	at org.apache.hc.core5.reactor.IOReactorWorker.run(IOReactorWorker.java:44)
      	at java.base/java.lang.Thread.run(Thread.java:829)
      

      This doesn't happen in blocking client, nor when I'll force async client to use HTTP 1.

      Attachments

        1. MainHttp2BugReproducer.java
          6 kB
          Dominik Derwiński

        Activity

          People

            Unassigned Unassigned
            morvael Dominik Derwiński
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: