MCPcopy Create free account
hub / github.com/apache/tomcat / hasPath

Method hasPath

java/org/apache/catalina/connector/Response.java:1587–1594  ·  view source on GitHub ↗

Determine if an absolute URL has a path component. @param uri the URL that will be checked @return true if the URL has a path

(String uri)

Source from the content-addressed store, hash-verified

1585 * @return <code>true</code> if the URL has a path
1586 */
1587 private boolean hasPath(String uri) {
1588 int pos = uri.indexOf("://");
1589 if (pos < 0) {
1590 return false;
1591 }
1592 pos = uri.indexOf('/', pos + 3);
1593 return pos >= 0;
1594 }
1595
1596 /**
1597 * Return the specified URL with the specified session identifier suitably encoded.

Callers 1

encodeURLMethod · 0.95

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected