 private final class Handler: ChannelInboundHandler {
   typealias InboundIn = HTTPServerRequestPart
 
+  let baseUrl: URL
   var request: URLRequest?
   let middleware: Middleware<StatusLineOpen, ResponseEnded, Prelude.Unit, Data>
 
-  init(_ middleware: @escaping Middleware<StatusLineOpen, ResponseEnded, Prelude.Unit, Data>) {
+  init(baseUrl: URL, middleware: @escaping Middleware<StatusLineOpen, ResponseEnded, Prelude.Unit, Data>) {
+    self.baseUrl = baseUrl
     self.middleware = middleware
   }
 

public func run(
  _ middleware: @escaping Middleware<StatusLineOpen, ResponseEnded, Prelude.Unit, Data>,
  on port: Int = 8080,
  gzip: Bool = false
  ) {

  do {

      }
    case .end:
      guard let req = self.request else {
        _ = ctx.channel.write(HTTPServerResponsePart.head(HTTPResponseHead(
          version: .init(major: 1, minor: 1),
          status: .init(statusCode: 307),
          headers: .init([("location", self.baseUrl.absoluteString)])
        )))
        _ = ctx.channel.writeAndFlush(HTTPServerResponsePart.end(nil)).then {
          ctx.channel.close()
        }
        return
      }

