Skip to content

Commit

Permalink
debug #112
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Oct 10, 2023
1 parent 5959c8e commit 33e7878
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion R/OWSHttpRequest.R
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,15 @@ OWSHttpRequest <- R6Class("OWSHttpRequest",
namedParams <- c(namedParams, request = request)
params <- paste(names(namedParams), namedParams, sep = "=", collapse = "&")
req <- url
if(!endsWith(url,"?") && nzchar(params)) req <- paste0(req, "?")
if(nzchar(params)){
if(!endsWith(url,"?")){
if(regexpr("\\?", url)>0){
req <- paste0(req, "&")
}else{
req <- paste0(req, "?")
}
}
}
if(regexpr("/cas?service=", url, fixed = T) > 0) params <- URLencode(params, reserved = TRUE)
req <- paste0(req, params)
self$INFO(sprintf("Fetching %s", req))
Expand Down

0 comments on commit 33e7878

Please sign in to comment.