Redirect on no trailing slash

This commit is contained in:
Joe Cheng
2014-03-20 10:14:02 -07:00
parent 068517c933
commit 6d7818962e

View File

@@ -562,6 +562,16 @@ proxyCallbacks <- function(prefix, targetCallbacks) {
list(
onHeaders = function(req) {
if (identical(req$PATH_INFO, prefix)) {
return(list(
status = 302L,
headers = list(
"Location" = paste(prefix, "/", sep = ""),
"Content-Type" = "text/plain"
),
body = ""
))
}
cat("onHeaders: ", req$PATH_INFO, "\n")
req <- matchReq(req)
if (is.null(req))