Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import org.http4s.blaze.pipeline.TailStage

import scala.concurrent._

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[http4s] class Http2Writer[F[_]](
tail: TailStage[StreamFrame],
private var headers: Headers,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -243,6 +243,7 @@ class BlazeServerBuilder[F[_]] private (
def withWebSockets(enableWebsockets: Boolean): Self =
this

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
def enableHttp2(enabled: Boolean): Self = copy(http2Support = enabled)

def withHttpApp(httpApp: HttpApp[F]): Self =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ import scala.concurrent.duration.Duration
import scala.concurrent.duration.FiniteDuration
import scala.util._

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private class Http2NodeStage[F[_]](
streamId: Int,
timeout: Duration,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,13 @@ import org.typelevel.vault._

import java.nio.ByteBuffer
import javax.net.ssl.SSLEngine
import scala.annotation.nowarn
import scala.concurrent.ExecutionContext
import scala.concurrent.duration.Duration

/** Facilitates the use of ALPN when using blaze http2 support */
private[http4s] object ProtocolSelector {
@nowarn("cat=deprecation")
def apply[F[_]](
engine: SSLEngine,
httpApp: HttpApp[F],
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.nio.ByteBuffer
/** Wrap a `ByteBuffer` in an `InputStream` interface. This is just an adapter to work with the
* twitter hpack implementation. I would really like to get rid of it.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final class ByteBufferInputStream(buffer: ByteBuffer) extends InputStream {
private[this] var markSize = -1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import scala.concurrent.Future
import scala.concurrent.duration.Duration

/** Representation of the HTTP connection or session */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private trait Connection {

/** An estimate for the current quality of the connection
Expand Down Expand Up @@ -78,6 +79,7 @@ private trait Connection {
def onClose: Future[Unit]
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[blaze] object Connection {
sealed abstract class State extends Product with Serializable {
final def closing: Boolean = !running
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import scala.util.{Failure, Success}
* the TailStage needs to be ready to go as this session will start reading from the channel
* immediately.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final class ConnectionImpl(
tailStage: TailStage[ByteBuffer],
val localSettings: Http2Settings,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package org.http4s.blaze.http.http2

import org.http4s.blaze.http.http2.FlowStrategy.Increment

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
final class DefaultFlowStrategy(localSettings: Http2Settings) extends FlowStrategy {
override def checkSession(session: SessionFlowControl): Int =
check(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import org.http4s.blaze.http.http2.FlowStrategy.Increment
*
* A `FlowStrategy` will be shared among many sessions.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
trait FlowStrategy {

/** Decide if the session window needs to send a WINDOW_UPDATE frame
Expand Down Expand Up @@ -52,6 +53,7 @@ trait FlowStrategy {
def checkStream(stream: StreamFlowWindow): Increment
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
object FlowStrategy {
// Make the object private to restrict construction of
// `Increment`s to the `makeIncrement` method
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.http4s.blaze.http.http2.bits.{Flags, Masks}

/* The job of the Http2FrameDecoder is to slice the ByteBuffers. It does
not attempt to decode headers or perform any size limiting operations */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private class FrameDecoder(localSettings: Http2Settings, listener: FrameListener) {
import bits._
import FrameDecoder._
Expand Down Expand Up @@ -310,6 +311,7 @@ private class FrameDecoder(localSettings: Http2Settings, listener: FrameListener
listener.onContinuationFrame(streamId, Flags.END_HEADERS(flags), buffer.slice())
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private object FrameDecoder {

/** Get the length field of the frame, consuming the bytes from the buffer.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import org.http4s.blaze.util.BufferTools
import scala.collection.mutable.ArrayBuffer

/** A more humane interface for writing HTTP messages. */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final class FrameEncoder(remoteSettings: Http2Settings, headerEncoder: HeaderEncoder) {
// Just a shortcut
private[this] def maxFrameSize: Int = remoteSettings.maxFrameSize
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import Http2Settings.Setting
* is 4 bytes long and the [[FrameListener]] would be expected to signal an error if the window
* increment was 0 or the update was for an idle stream.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private trait FrameListener {

/** Determine whether we are in the midst of a sequence of header and header continuation frames
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import java.nio.charset.StandardCharsets
import org.http4s.blaze.http.http2.Http2Settings.Setting
import org.http4s.blaze.util.BufferTools

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[http2] object FrameSerializer {
import bits._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ import Http2Exception.PROTOCOL_ERROR
* @note
* This class is not 'thread safe' and should be treated accordingly.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private abstract class HeaderAggregatingFrameListener(
localSettings: Http2Settings,
headerDecoder: HeaderDecoder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ import scala.util.control.NonFatal
* @param maxTableSize
* maximum compression table to maintain
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final class HeaderDecoder(
maxHeaderListSize: Int,
discardOverflowHeaders: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import com.twitter.hpack.Encoder
* @param initialMaxTableSize
* maximum HPACK table size the peer will allow.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
class HeaderEncoder(initialMaxTableSize: Int) {
private[this] val encoder = new Encoder(initialMaxTableSize)
private[this] val os = new ByteArrayOutputStream(1024)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import java.nio.charset.StandardCharsets.UTF_8
import scala.collection.mutable
import scala.util.control.NoStackTrace

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
sealed abstract class Http2Exception(msg: String)
extends Exception(msg)
with NoStackTrace
Expand Down Expand Up @@ -61,12 +62,15 @@ sealed abstract class Http2Exception(msg: String)
final def msgBuffer(): ByteBuffer = ByteBuffer.wrap(msg.getBytes(UTF_8))
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
final case class Http2StreamException(stream: Int, code: Long, msg: String)
extends Http2Exception(msg)

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
final case class Http2SessionException(code: Long, msg: String) extends Http2Exception(msg)

///////////////////// HTTP/2.0 Errors //////////////////////////////
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
object Http2Exception {
final class ErrorGenerator private[http2] (val code: Long, val name: String) {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import scala.collection.mutable
* @see
* https://tools.ietf.org/html/rfc7540#section-6.5.2, where the doc strings were obtained.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
sealed abstract class Http2Settings {

/** Allows the sender to inform the remote endpoint of the maximum size of the header compression
Expand Down Expand Up @@ -82,6 +83,7 @@ sealed abstract class Http2Settings {
}

/** Immutable representation of [[Http2Settings]] for configuring clients and servers */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
case class ImmutableHttp2Settings(
headerTableSize: Int,
initialWindowSize: Int,
Expand All @@ -91,6 +93,7 @@ case class ImmutableHttp2Settings(
maxHeaderListSize: Int
) extends Http2Settings

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
object Http2Settings {
type SettingValue = Int

Expand Down Expand Up @@ -192,6 +195,7 @@ object Http2Settings {
}

/** Internal mutable representation of the [[Http2Settings]] */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[blaze] final class MutableHttp2Settings private (
var headerTableSize: Int,
var initialWindowSize: Int,
Expand Down Expand Up @@ -229,6 +233,7 @@ private[blaze] final class MutableHttp2Settings private (
s"MutableHttp2Settings(${toSeq.mkString(", ")})"
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private object MutableHttp2Settings {
private val logger = getLogger

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ package org.http4s.blaze.http.http2
* @note
* this is only a marker trait
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private trait InboundStreamState extends StreamState
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

package org.http4s.blaze.http.http2

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final class InboundStreamStateImpl(
session: SessionCore,
val streamId: Int,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,5 @@ package org.http4s.blaze.http.http2
* @note
* this is a marker trait
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private trait OutboundStreamState extends StreamState
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.http4s.blaze.http.http2
import scala.concurrent.Promise
import scala.concurrent.duration.Duration

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private abstract class OutboundStreamStateImpl(session: SessionCore)
extends StreamStateImpl(session)
with OutboundStreamState {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.log4s.getLogger
import scala.concurrent.{Future, Promise}
import scala.concurrent.duration.Duration

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private class PingManager(session: SessionCore) {
import PingManager._

Expand Down Expand Up @@ -99,6 +100,7 @@ private class PingManager(session: SessionCore) {
}
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private object PingManager {
private sealed trait State

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ import org.http4s.blaze.util.{BufferTools, Execution}
import scala.concurrent.{ExecutionContext, Future}

/** Base type for performing the HTTP/2 prior knowledge handshake */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
abstract class PriorKnowledgeHandshaker[T](localSettings: ImmutableHttp2Settings)
extends TailStage[ByteBuffer] {
implicit protected final def ec: ExecutionContext = Execution.trampoline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@

package org.http4s.blaze.http.http2

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
sealed trait Priority {
def isDefined: Boolean
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
object Priority {

/** object representing the contents of a PRIORITY frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.http4s.blaze.http.http2

/** HTTP/2 pseudo headers */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
object PseudoHeaders {
// Request pseudo headers
val Method = ":method"
Expand Down
7 changes: 7 additions & 0 deletions http/src/main/scala/org/http4s/blaze/http/http2/Result.scala
Original file line number Diff line number Diff line change
Expand Up @@ -17,16 +17,20 @@
package org.http4s.blaze.http.http2

/** Result type of many of the codec methods */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private sealed trait Result extends Product with Serializable

/** Didn't get enough data to decode a full HTTP/2 frame */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private case object BufferUnderflow extends Result

/** Represents the possibility of failure */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private sealed abstract class MaybeError extends Result {
final def success: Boolean = this == Continue
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private object MaybeError {
def apply(option: Option[Http2Exception]): MaybeError =
option match {
Expand All @@ -35,5 +39,8 @@ private object MaybeError {
}
}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private case object Continue extends MaybeError

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private final case class Error(err: Http2Exception) extends MaybeError
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import scala.concurrent.duration.Duration
* 'bag-o-references' so that each component can reference each other. This helps to avoid
* construction order conflicts.
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private abstract class SessionCore {
// Fields
def serialExecutor: ExecutionContext
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package org.http4s.blaze.http.http2

/** Flow control representation of a Http2 Session */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
abstract class SessionFlowControl {

/** Create a new [[StreamFlowWindow]] for a stream which will update and check the bounds of the
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ import org.http4s.blaze.http.http2.Http2Exception.{FLOW_CONTROL_ERROR, PROTOCOL_
import org.log4s.getLogger

/** Flow control representation of a Http2 Session */
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private class SessionFlowControlImpl(
session: SessionCore,
flowStrategy: FlowStrategy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import org.http4s.blaze.http.http2.Http2Settings.Setting
* Concurrency is not controlled by this type; it is expected that thread safety will be managed by
* the [[ConnectionImpl]].
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private class SessionFrameListener(
session: SessionCore,
isClient: Boolean,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import org.http4s.blaze.http.http2.bits.{Flags, FrameTypes}
* @see
* https://tools.ietf.org/html/rfc7540#section-6.5
*/
@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[blaze] object SettingsDecoder {

/** Representation of a settings frame
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package org.http4s.blaze.http.http2
import java.util.Locale
import scala.collection.mutable.{ArrayBuffer, Builder}

@deprecated("HTTP/2 support is unmaintained and will be removed in a future version.", "0.23.18")
private[http2] object StageTools {
// There are two copies of this because `Growable` moved in Scala
// 2.13 and we're stuck with the deprecation warning. It's private
Expand Down
Loading
Loading