~hrbrmstr/curlparse

746da27403c016e768f7d8627e89ba432621e425 — boB Rudis 4 years ago a988363
named param
4 files changed, 10 insertions(+), 5 deletions(-)

M DESCRIPTION
M R/is-valid-url.R
M man/scheme.Rd
M tools/option_table.txt
M DESCRIPTION => DESCRIPTION +1 -1
@@ 9,7 9,7 @@ Authors@R: c( person("Bob", "Rudis", email = "bob@rud.is", role =
        "0000-0002-4035-0289")) )
Description: Tools are provided to parse URLs using the modern
        'libcurl' built-in parser.
License: MIT + file LICENSE
License: Z
SystemRequirements: libcurl: libcurl-devel (rpm) or
        libcurl4-openssl-dev (deb).
URL: https://gitlab.com/hrbrmstr/curlparse

M R/is-valid-url.R => R/is-valid-url.R +1 -1
@@ 9,6 9,6 @@ is_valid_url <- function(urls) {
  stri_detect_regex(
    str = urls,
    pattern = "^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)*(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,})))(?::\\d{2,5})?(?:/[^\\s]*)?$",
    opts_regex = stri_opts_regex(TRUE)
    opts_regex = stri_opts_regex(case_insensitive = TRUE)
  )
}

M man/scheme.Rd => man/scheme.Rd +1 -3
@@ 1,5 1,5 @@
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R, R/Z-domain.R, R/domain.R
% Please edit documentation in R/RcppExports.R, R/Z-domain.R
\name{scheme}
\alias{scheme}
\alias{user}


@@ 32,8 32,6 @@ query(urls)
fragment(urls)

domain(urls)

domain(urls)
}
\arguments{
\item{urls}{character vector of URLs}

M tools/option_table.txt => tools/option_table.txt +7 -0
@@ 261,3 261,10 @@
  CURLOPT_DOH_URL = 10000 + 279
  CURLOPT_UPLOAD_BUFFERSIZE = 0 + 280
  CURLOPT_UPKEEP_INTERVAL_MS = 0 + 281
  CURLOPT_CURLU = 10000 + 282
  CURLOPT_TRAILERFUNCTION = 20000 + 283
  CURLOPT_TRAILERDATA = 10000 + 284
  CURLOPT_HTTP09_ALLOWED = 0 + 285
  CURLOPT_ALTSVC_CTRL = 0 + 286
  CURLOPT_ALTSVC = 10000 + 287
  CURLOPT_MAXAGE_CONN = 0 + 288