You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@storm.apache.org by pt...@apache.org on 2016/07/21 16:27:12 UTC

[4/8] storm git commit: STORM-1890: add maven depency to for ring-core 1.3.1, move org.apache.commons.FileUtils to 1.3.2 as that is needed by ring-core 1.3.1, move compojure to 1.1.9 since it matches 1.3.1

STORM-1890: add maven depency to for ring-core 1.3.1, move org.apache.commons.FileUtils to 1.3.2 as that is needed by ring-core 1.3.1, move compojure to 1.1.9 since it matches 1.3.1


Project: http://git-wip-us.apache.org/repos/asf/storm/repo
Commit: http://git-wip-us.apache.org/repos/asf/storm/commit/09c76f51
Tree: http://git-wip-us.apache.org/repos/asf/storm/tree/09c76f51
Diff: http://git-wip-us.apache.org/repos/asf/storm/diff/09c76f51

Branch: refs/heads/master
Commit: 09c76f510a13a1a8f6454fd867f00579622fb488
Parents: 9524679
Author: Alessandro Bellina <ab...@yahoo-inc.com>
Authored: Thu Jun 16 11:07:48 2016 -0500
Committer: Alessandro Bellina <ab...@yahoo-inc.com>
Committed: Fri Jul 1 14:18:30 2016 -0500

----------------------------------------------------------------------
 pom.xml                                            | 11 ++++++++---
 storm-core/pom.xml                                 |  4 ++++
 storm-core/src/clj/org/apache/storm/ui/helpers.clj | 12 +++---------
 3 files changed, 15 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index e8e7bb7..5989553 100644
--- a/pom.xml
+++ b/pom.xml
@@ -209,19 +209,19 @@
         <!-- dependency versions -->
         <clojure.version>1.7.0</clojure.version>
         <java_jmx.version>0.3.1</java_jmx.version>
-        <compojure.version>1.1.3</compojure.version>
+        <compojure.version>1.1.9</compojure.version>
         <hiccup.version>0.3.6</hiccup.version>
         <commons-compress.version>1.4.1</commons-compress.version>
         <commons-io.version>2.5</commons-io.version>
         <commons-lang.version>2.5</commons-lang.version>
         <commons-exec.version>1.1</commons-exec.version>
-        <commons-fileupload.version>1.2.1</commons-fileupload.version>
+        <commons-fileupload.version>1.3.2</commons-fileupload.version>
         <commons-codec.version>1.6</commons-codec.version>
         <commons-cli.version>1.3.1</commons-cli.version>
         <clj-time.version>0.8.0</clj-time.version>
         <curator.version>2.10.0</curator.version>
         <json-simple.version>1.1</json-simple.version>
-        <ring.version>1.3.0</ring.version>
+        <ring.version>1.3.1</ring.version>
         <ring-json.version>0.3.1</ring-json.version>
         <jetty.version>7.6.13.v20130916</jetty.version>
         <clojure.tools.logging.version>0.2.3</clojure.tools.logging.version>
@@ -673,6 +673,11 @@
             </dependency>
             <dependency>
                 <groupId>ring</groupId>
+                <artifactId>ring-core</artifactId>
+                <version>${ring.version}</version>
+            </dependency>
+            <dependency>
+                <groupId>ring</groupId>
                 <artifactId>ring-devel</artifactId>
                 <version>${ring.version}</version>
             </dependency>

http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/storm-core/pom.xml
----------------------------------------------------------------------
diff --git a/storm-core/pom.xml b/storm-core/pom.xml
index a012172..016bde5 100644
--- a/storm-core/pom.xml
+++ b/storm-core/pom.xml
@@ -74,6 +74,10 @@
         </dependency>
         <dependency>
             <groupId>ring</groupId>
+            <artifactId>ring-core</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>ring</groupId>
             <artifactId>ring-devel</artifactId>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/storm/blob/09c76f51/storm-core/src/clj/org/apache/storm/ui/helpers.clj
----------------------------------------------------------------------
diff --git a/storm-core/src/clj/org/apache/storm/ui/helpers.clj b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
index e5d64b1..16e6a6a 100644
--- a/storm-core/src/clj/org/apache/storm/ui/helpers.clj
+++ b/storm-core/src/clj/org/apache/storm/ui/helpers.clj
@@ -44,24 +44,18 @@
 
 ;; TODO this function and its callings will be replace when ui.core and logviewer and drpc move to Java
 (def num-web-requests (StormMetricsRegistry/registerMeter "num-web-requests"))
-;; (defn requests-middleware
-;;   "Coda Hale metric for counting the number of web requests."
-;;   [handler]
-;;   (fn [req]
-;;     (.mark num-web-requests)
-;;     (handler req)))
 
 (defn requests-middleware
   "Wrap request with Coda Hale metric for counting the number of web requests, 
-  and add Cache-Control: no-cache for /*.html files (html files in root directory)"
+  and add Cache-Control: no-cache for html files in root directory (index.html, topology.html, etc)"
   [handler]
   (fn [req]
     (.mark num-web-requests)
     (let [uri (:uri req)
           res (handler req) 
           content-type (response/get-header res "Content-Type")]
-      ;; check that the response is html and that uri is for a root page: a single / in the url
-      ;; then we know we don't want it cached (e.g. index.html)
+      ;; check that the response is html and that the path is for a root page: a single / in the path 
+      ;; then we know we don't want it cached (e.g. /index.html)
       (if (and (= content-type "text/html") 
                (= 1 (StringUtils/countMatches uri "/")))
         ;; response for html page in root directory, no-cache