static void setHttp2Authority ( String authority , Http2Headers out ) { // The authority MUST NOT include the deprecated "userinfo" subcomponent if ( authority != null ) { if ( authority . isEmpty ( ) ) { out . authority ( EMPTY_STRING ) ; } else { int start = authority . indexOf ( ' ' ) + 1 ; int length = authority . length ( ) - start ; if ( length == 0 ) { throw new IllegalArgumentException ( "authority: " + authority ) ; } out . authority ( new AsciiString ( authority , start , length ) ) ; } } }
package - private for testing only