Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for readHeaders (0.21 sec)

  1. okhttp/src/test/java/okhttp3/internal/http2/HpackTest.kt

    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 38.2K bytes
    - Viewed (0)
  2. okhttp-hpacktests/src/test/java/okhttp3/internal/http2/HpackDecodeTestBase.kt

      protected fun testDecoder(story: Story) {
        for (testCase in story.cases) {
          val encoded = testCase.wire ?: continue
          bytesIn.write(encoded)
          hpackReader.readHeaders()
          assertSetEquals(
            "seqno=$testCase.seqno",
            testCase.headersList,
            hpackReader.getAndResetHeaderList(),
          )
        }
      }
    
      companion object {
        /**
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/http1/HeadersReader.kt

      fun readLine(): String {
        val line = source.readUtf8LineStrict(headerLimit)
        headerLimit -= line.length.toLong()
        return line
      }
    
      /** Reads headers or trailers. */
      fun readHeaders(): Headers {
        val result = Headers.Builder()
        while (true) {
          val line = readLine()
          if (line.isEmpty()) break
          result.addLenient(line)
        }
        return result.build()
      }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Wed Dec 20 23:27:07 GMT 2023
    - 1.4K bytes
    - Viewed (0)
  4. okhttp/src/main/kotlin/okhttp3/internal/http2/Http2Reader.kt

          throw IOException("Expected a SETTINGS frame but was ${formattedType(type)}")
        }
    
        when (type) {
          TYPE_DATA -> readData(handler, length, flags, streamId)
          TYPE_HEADERS -> readHeaders(handler, length, flags, streamId)
          TYPE_PRIORITY -> readPriority(handler, length, flags, streamId)
          TYPE_RST_STREAM -> readRstStream(handler, length, flags, streamId)
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 19.9K bytes
    - Viewed (0)
  5. okhttp/src/main/kotlin/okhttp3/internal/http1/Http1ExchangeCodec.kt

          val responseBuilder =
            Response.Builder()
              .protocol(statusLine.protocol)
              .code(statusLine.code)
              .message(statusLine.message)
              .headers(headersReader.readHeaders())
              .trailers { error("trailers not available") }
    
          return when {
            expectContinue && statusLine.code == HTTP_CONTINUE -> {
              null
            }
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 16.2K bytes
    - Viewed (0)
  6. okhttp/src/main/kotlin/okhttp3/MultipartReader.kt

              -1 -> throw ProtocolException("unexpected characters after boundary")
            }
          }
    
          // There's another part. Parse its headers and return it.
          val headers = HeadersReader(source).readHeaders()
          val partSource = PartSource()
          currentPart = partSource
          return Part(headers, partSource.buffer())
        }
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 7.1K bytes
    - Viewed (0)
  7. okhttp/src/main/kotlin/okhttp3/internal/http2/Hpack.kt

          /**
           * Read `byteCount` bytes of headers from the source stream. This implementation does not
           * propagate the never indexed flag of a header.
           */
          @Throws(IOException::class)
          fun readHeaders() {
            while (!source.exhausted()) {
              val b = source.readByte() and 0xff
              when {
                b == 0x80 -> {
                  // 10000000
                  throw IOException("index == 0")
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 22.5K bytes
    - Viewed (1)
  8. okhttp/src/main/kotlin/okhttp3/internal/ws/WebSocketReader.kt

       */
      @Throws(IOException::class)
      fun processNextFrame() {
        readHeader()
        if (isControlFrame) {
          readControlFrame()
        } else {
          readMessageFrame()
        }
      }
    
      @Throws(IOException::class, ProtocolException::class)
      private fun readHeader() {
        if (closed) throw IOException("closed")
    
        // Disable the timeout to read the first byte of a new frame.
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 9.8K bytes
    - Viewed (0)
  9. okhttp-tls/src/main/kotlin/okhttp3/tls/internal/der/DerReader.kt

        if (result == null) {
          result = readHeader()
          peekedHeader = result
        }
    
        if (result.isEndOfData) return null
    
        return result
      }
    
      /**
       * Consume the next header in the stream and return it. If there is no header to read because we
       * have reached a limit, this returns [END_OF_DATA].
       */
      internal fun readHeader(): DerHeader {
        require(peekedHeader == null)
    
    Plain Text
    - Registered: Fri Apr 26 11:42:10 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 10.5K bytes
    - Viewed (0)
  10. src/archive/tar/reader.go

    			return nil, err
    		}
    		if _, err := tryReadFull(tr.r, tr.blk[:tr.pad]); err != nil {
    			return nil, err
    		}
    		tr.pad = 0
    
    		hdr, rawHdr, err := tr.readHeader()
    		if err != nil {
    			return nil, err
    		}
    		if err := tr.handleRegularFile(hdr); err != nil {
    			return nil, err
    		}
    		format.mayOnlyBe(hdr.Format)
    
    		// Check for PAX/GNU special headers and files.
    Go
    - Registered: Tue Apr 23 11:13:09 GMT 2024
    - Last Modified: Fri Mar 08 01:59:14 GMT 2024
    - 26.8K bytes
    - Viewed (0)
Back to top