MCPcopy Create free account
hub / github.com/DeNA/PacketProxy / getURL

Method getURL

src/main/java/core/packetproxy/http/Http.java:368–382  ·  view source on GitHub ↗
(int port, boolean use_ssl)

Source from the content-addressed store, hash-verified

366 }
367
368 public String getURL(int port, boolean use_ssl) {
369 if (version.equals("HTTP/2") || version.equals("HTTP/3")) {
370
371 return getURI();
372 } else { /* HTTP/1.1 */
373
374 String query = (getQueryAsString() != null && getQueryAsString().length() > 0)
375 ? "?" + getQueryAsString()
376 : "";
377 String path = getPath();
378 String host = header.getValue("Host").orElse(null);
379 String protocol = (use_ssl ? "https" : "http");
380 return String.format("%s://%s%s%s", protocol, host, path, query);
381 }
382 }
383
384 private String getURI() {
385 String authority = "unknown";

Callers 8

generateTestMetaDataMethod · 0.95
getSummarizedRequestMethod · 0.95
getSummarizedRequestMethod · 0.95
getSummarizedRequestMethod · 0.95
updateServerNameMethod · 0.95
actionPerformedMethod · 0.95
buildMethod · 0.95
actionPerformedMethod · 0.95

Calls 7

getURIMethod · 0.95
getQueryAsStringMethod · 0.95
getPathMethod · 0.95
lengthMethod · 0.80
equalsMethod · 0.45
getValueMethod · 0.45
formatMethod · 0.45

Tested by 1

generateTestMetaDataMethod · 0.76