Class HttpUtils


  • public class HttpUtils
    extends Object
    Author:
    pthomas3
    • Method Detail

      • parseContentTypeCharset

        public static Charset parseContentTypeCharset​(String mimeType)
      • parseContentTypeParams

        public static Map<String,​String> parseContentTypeParams​(String mimeType)
      • normaliseUriPath

        public static String normaliseUriPath​(String uri)
      • flushAndClose

        public static void flushAndClose​(io.netty.channel.Channel ch)
      • createSelfSignedCertificate

        public static void createSelfSignedCertificate​(File cert,
                                                       File key)
      • getSslContext

        public static SSLContext getSslContext​(File keyStoreFile)
      • initKeyStore

        public static File initKeyStore​(File keyStoreFile)
      • createResponse

        public static io.netty.handler.codec.http.FullHttpResponse createResponse​(int status,
                                                                                  String body)
      • createResponse

        public static io.netty.handler.codec.http.FullHttpResponse createResponse​(io.netty.handler.codec.http.HttpResponseStatus status,
                                                                                  String body)
      • transform

        public static io.netty.handler.codec.http.FullHttpResponse transform​(io.netty.handler.codec.http.FullHttpResponse original,
                                                                             String body)
      • connectionEstablished

        public static io.netty.handler.codec.http.FullHttpResponse connectionEstablished()
      • fixHeadersForProxy

        public static void fixHeadersForProxy​(io.netty.handler.codec.http.HttpRequest request)
      • addViaHeader

        public static void addViaHeader​(io.netty.handler.codec.http.HttpMessage msg,
                                        String alias)