cache path URI in table
This commit is contained in:
parent
beb5918c3c
commit
9acf971cc1
|
@ -116,10 +116,15 @@ public class MetaData implements Iterable<HttpField>
|
|||
}
|
||||
|
||||
public Request(HttpVersion version, HttpScheme scheme, String method, HostPortHttpField authority, String path, HttpFields fields)
|
||||
{
|
||||
this(version,scheme,method,authority,new HttpURI(path),fields);
|
||||
}
|
||||
|
||||
public Request(HttpVersion version, HttpScheme scheme, String method, HostPortHttpField authority, HttpURI path, HttpFields fields)
|
||||
{
|
||||
super(version,fields);
|
||||
_method=method;
|
||||
_uri=new HttpURI(path); // TODO - this is not so efficient!
|
||||
_uri=path;
|
||||
_hostPort = authority;
|
||||
_scheme=scheme;
|
||||
}
|
||||
|
|
|
@ -27,6 +27,7 @@ import org.eclipse.jetty.http.HttpHeader;
|
|||
import org.eclipse.jetty.http.HttpMethod;
|
||||
import org.eclipse.jetty.http.HttpScheme;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.HttpURI;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
import org.eclipse.jetty.http2.hpack.HpackContext.Entry;
|
||||
import org.eclipse.jetty.util.TypeUtil;
|
||||
|
@ -185,6 +186,13 @@ public class HpackDecoder
|
|||
field = new AuthorityHttpField(value);
|
||||
break;
|
||||
|
||||
case ":path":
|
||||
if (indexed)
|
||||
field = new StaticValueHttpField(header,name,value,new HttpURI(value));
|
||||
else
|
||||
field = new HttpField(header,name,value);
|
||||
break;
|
||||
|
||||
default:
|
||||
field = new HttpField(header,name,value);
|
||||
break;
|
||||
|
|
|
@ -26,6 +26,7 @@ import org.eclipse.jetty.http.HttpField;
|
|||
import org.eclipse.jetty.http.HttpFields;
|
||||
import org.eclipse.jetty.http.HttpScheme;
|
||||
import org.eclipse.jetty.http.HttpStatus;
|
||||
import org.eclipse.jetty.http.HttpURI;
|
||||
import org.eclipse.jetty.http.HttpVersion;
|
||||
import org.eclipse.jetty.http.MetaData;
|
||||
|
||||
|
@ -40,7 +41,7 @@ public class MetaDataBuilder
|
|||
private String _method;
|
||||
private HttpScheme _scheme;
|
||||
private HostPortHttpField _authority;
|
||||
private String _path;
|
||||
private HttpURI _path;
|
||||
|
||||
private HttpFields _fields = new HttpFields(10);
|
||||
|
||||
|
@ -89,6 +90,10 @@ public class MetaDataBuilder
|
|||
_scheme = (HttpScheme)value.getStaticValue();
|
||||
break;
|
||||
|
||||
case ":path":
|
||||
_path = (HttpURI)value.getStaticValue();
|
||||
break;
|
||||
|
||||
default:
|
||||
throw new IllegalArgumentException();
|
||||
}
|
||||
|
@ -114,7 +119,7 @@ public class MetaDataBuilder
|
|||
break;
|
||||
|
||||
case ":path":
|
||||
_path=field.getValue();
|
||||
_path=new HttpURI(field.getValue());
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
Loading…
Reference in New Issue