MCPcopy Index your code
hub / github.com/apache/tomcat / parseAuthority

Method parseAuthority

java/org/apache/coyote/http2/Stream.java:523–543  ·  view source on GitHub ↗
(String value)

Source from the content-addressed store, hash-verified

521 }
522
523 private void parseAuthority(String value) {
524 int i;
525 try {
526 i = Host.parse(value);
527 if (i > -1) {
528 coyoteRequest.serverName().setString(value.substring(0, i));
529 coyoteRequest.setServerPort(Integer.parseInt(value.substring(i + 1)));
530 } else {
531 coyoteRequest.serverName().setString(value);
532 }
533 } catch (IllegalArgumentException iae) {
534 // Bad :authority / host header -> 400 response
535 coyoteRequest.setNote(Request.NOTE_BAD_REQUEST, Boolean.TRUE);
536 }
537 // Match host name with SNI if required
538 if (!handler.getProtocol().getHttp11Protocol().checkSni(handler.getSniHostName(),
539 coyoteRequest.serverName().getString())) {
540 headerException = new StreamException(sm.getString("stream.host.sni", getConnectionId(), getIdAsString(),
541 value, handler.getSniHostName()), Http2Error.PROTOCOL_ERROR, getIdAsInt());
542 }
543 }
544
545
546 private void compareAuthority(String value) {

Callers 1

emitHeaderMethod · 0.95

Calls 14

parseMethod · 0.95
getConnectionIdMethod · 0.95
serverNameMethod · 0.80
getHttp11ProtocolMethod · 0.80
getIdAsStringMethod · 0.80
getIdAsIntMethod · 0.80
setNoteMethod · 0.65
getProtocolMethod · 0.65
getStringMethod · 0.65
setStringMethod · 0.45
setServerPortMethod · 0.45
parseIntMethod · 0.45

Tested by

no test coverage detected