Skip to content

Commit 2b9d003

Browse files
committed
Merge pull request #458 from ropensci/fix/ssl
Ensure that we always return HTTPS links. Fixes #455
2 parents d11e38f + 24ecc98 commit 2b9d003

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: plotly
22
Title: Create Interactive Web Graphics via Plotly's JavaScript Graphing Library
3-
Version: 2.4.2
3+
Version: 2.4.3
44
Authors@R: c(person("Carson", "Sievert", role = c("aut", "cre"),
55
email = "[email protected]"),
66
person("Chris", "Parmer", role = c("aut", "cph"),

NEWS

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2.4.3 -- 11 Feb 2015
2+
3+
Ensure that we always return HTTPS links. Fixes #455
4+
15
2.4.2 -- 9 Feb 2015
26

37
Fix for on-premise domain configuration.

R/process.R

+4
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ process <- function(resp) {
99
process.clientresp <- function(resp) {
1010
httr::stop_for_status(resp)
1111
con <- from_JSON(httr::content(resp, as = "text"))
12+
# make sure that we always return a HTTPS link
13+
con$url <- sub("^http[s]?:", "https:", con$url)
1214
if (nchar(con$error) > 0) stop(con$error, call. = FALSE)
1315
if (nchar(con$warning) > 0) warning(con$warning, call. = FALSE)
1416
if (nchar(con$message) > 0) message(con$message, call. = FALSE)
@@ -27,6 +29,8 @@ process.figure <- function(resp) {
2729
con <- from_JSON(content(resp, as = "text"))
2830
fig <- con$payload$figure
2931
fig$url <- sub("apigetfile/", "~", resp$url)
32+
# make sure that we always return a HTTPS link
33+
con$url <- sub("^http[s]?:", "https:", con$url)
3034
fig <- add_boxed(fig)
3135
fig$data[[1]]$inherit <- FALSE
3236
# any reasonable way to return a data frame?

0 commit comments

Comments
 (0)