Skip to content

Commit

Permalink
Merge pull request #346 from jcheng5/partial-match-hostname
Browse files Browse the repository at this point in the history
Fix warning: "partial match of 'host' to 'hostname'"
  • Loading branch information
adambanker authored Dec 11, 2020
2 parents 998a7bd + 53551a4 commit e01d006
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions paws.common/R/url.R
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Url <- struct(
parse_url <- function(url) {
p <- httr::parse_url(url)
if (is.null(p$scheme)) p$scheme <- ""
if (is.null(p$host)) p$host <- ""
if (!is.null(p$port)) p$host <- paste0(p$host, ":", p$port)
if (is.null(p$hostname)) p$hostname <- ""
if (!is.null(p$port)) p$hostname <- paste0(p$hostname, ":", p$port)
raw_path <- p$path
if (raw_path == "") raw_path <- "/"
else if (substr(raw_path, 1, 1) != "/") raw_path <- paste0("/", raw_path)
Expand All @@ -29,7 +29,7 @@ parse_url <- function(url) {
if (escaped_path == raw_path) raw_path <- ""
u <- Url(
scheme = p$scheme,
host = p$host,
host = p$hostname,
path = path,
raw_path = raw_path,
raw_query = build_query_string(p$query),
Expand Down

0 comments on commit e01d006

Please sign in to comment.