Skip to content
This repository has been archived by the owner on Mar 22, 2023. It is now read-only.

Commit

Permalink
introduces http2-hpack from Jetty version 9.4.28.v20200408
Browse files Browse the repository at this point in the history
  • Loading branch information
shamsimam committed May 4, 2020
1 parent d1a2bf7 commit 200ef43
Show file tree
Hide file tree
Showing 13 changed files with 2,292 additions and 1 deletion.
4 changes: 3 additions & 1 deletion project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@
[org.eclipse.jetty/jetty-alpn-openjdk8-client ~jetty-version]
[org.eclipse.jetty/jetty-alpn-openjdk8-server ~jetty-version]
[org.eclipse.jetty.alpn/alpn-api "1.1.3.v20160715"]
[org.eclipse.jetty.http2/http2-common ~jetty-version]
[org.eclipse.jetty.http2/http2-common ~jetty-version
:exclusions [org.eclipse.jetty.http2/http2-hpack]]
[org.eclipse.jetty.http2/http2-http-client-transport ~jetty-version]
[org.eclipse.jetty.http2/http2-client ~jetty-version]
[cheshire "5.5.0"]]
Expand Down Expand Up @@ -50,4 +51,5 @@
:defaults {:doc/format :markdown}}
:source-paths ["src/clj"]
:java-source-paths ["src/java"]
:resource-paths ["src/resources"]
:global-vars {*warn-on-reflection* true})
38 changes: 38 additions & 0 deletions src/java/org/eclipse/jetty/http2/hpack/AuthorityHttpField.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
//
// ========================================================================
// Copyright (c) 1995-2020 Mort Bay Consulting Pty Ltd and others.
// ------------------------------------------------------------------------
// All rights reserved. This program and the accompanying materials
// are made available under the terms of the Eclipse Public License v1.0
// and Apache License v2.0 which accompanies this distribution.
//
// The Eclipse Public License is available at
// http://www.eclipse.org/legal/epl-v10.html
//
// The Apache License v2.0 is available at
// http://www.opensource.org/licenses/apache2.0.php
//
// You may elect to redistribute this code under either of these licenses.
// ========================================================================
//

package org.eclipse.jetty.http2.hpack;

import org.eclipse.jetty.http.HostPortHttpField;
import org.eclipse.jetty.http.HttpHeader;

/**
*
*/
public class AuthorityHttpField extends HostPortHttpField {
public static final String AUTHORITY = HpackContext.STATIC_TABLE[1][0];

public AuthorityHttpField(String authority) {
super(HttpHeader.C_AUTHORITY, AUTHORITY, authority);
}

@Override
public String toString() {
return String.format("%s(preparsed h=%s p=%d)", super.toString(), getHost(), getPort());
}
}

0 comments on commit 200ef43

Please sign in to comment.