You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by el...@apache.org on 2017/01/11 21:34:30 UTC
[6/8] incubator-trafficcontrol git commit: blindly add '/' to the
beginning of static file name
blindly add '/' to the beginning of static file name
(cherry picked from commit 1d37e4d5572fe2829f228fa8ec3aec226c5a06a2)
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/commit/7aa859e8
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/tree/7aa859e8
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/diff/7aa859e8
Branch: refs/heads/master
Commit: 7aa859e8c054c061fc036c30fd76cf79de230664
Parents: 44109ae
Author: David Neuman <da...@gmail.com>
Authored: Tue Jan 10 12:51:34 2017 -0700
Committer: David Neuman <da...@gmail.com>
Committed: Wed Jan 11 16:02:17 2017 +0000
----------------------------------------------------------------------
.../experimental/traffic_monitor/srvhttp/srvhttp.go | 7 -------
1 file changed, 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafficcontrol/blob/7aa859e8/traffic_monitor/experimental/traffic_monitor/srvhttp/srvhttp.go
----------------------------------------------------------------------
diff --git a/traffic_monitor/experimental/traffic_monitor/srvhttp/srvhttp.go b/traffic_monitor/experimental/traffic_monitor/srvhttp/srvhttp.go
index 09a5194..c7c1362 100644
--- a/traffic_monitor/experimental/traffic_monitor/srvhttp/srvhttp.go
+++ b/traffic_monitor/experimental/traffic_monitor/srvhttp/srvhttp.go
@@ -25,7 +25,6 @@ import (
"net"
"net/http"
"net/url"
- "strings"
"sync"
"time"
@@ -145,16 +144,10 @@ func DateStr(t time.Time) string {
}
func (s *Server) handleRootFunc(staticFileDir string) (http.HandlerFunc, error) {
- if strings.HasSuffix(staticFileDir, "/") {
- return s.handleFile(staticFileDir + "index.html")
- }
return s.handleFile(staticFileDir + "/index.html")
}
func (s *Server) handleSortableFunc(staticFileDir string) (http.HandlerFunc, error) {
- if strings.HasSuffix(staticFileDir, "/") {
- return s.handleFile(staticFileDir + "sorttable.js")
- }
return s.handleFile(staticFileDir + "/sorttable.js")
}