dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33568
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17154: Removed file extensions for api files script/style, confused caching in certain server setups
------------------------------------------------------------
revno: 17154
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-10-17 15:04:14 +0200
message:
Removed file extensions for api files script/style, confused caching in certain server setups
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm
dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm
dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java 2014-09-09 23:57:34 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/FileController.java 2014-10-17 13:04:14 +0000
@@ -66,7 +66,7 @@
// Custom script
// -------------------------------------------------------------------------
- @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.GET )
+ @RequestMapping( value = "/script", method = RequestMethod.GET )
public void getCustomScript( HttpServletResponse response, Writer writer )
throws IOException
{
@@ -77,7 +77,7 @@
writer.write( content );
}
- @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.POST, consumes = "application/javascript" )
+ @RequestMapping( value = "/script", method = RequestMethod.POST, consumes = "application/javascript" )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void postCustomScript( @RequestBody String content, HttpServletResponse response )
{
@@ -88,7 +88,7 @@
}
}
- @RequestMapping( value = { "/script", "/script.js" }, method = RequestMethod.DELETE )
+ @RequestMapping( value = "/script", method = RequestMethod.DELETE )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void removeCustomScript( HttpServletResponse response )
{
@@ -102,7 +102,7 @@
/**
* The style/external mapping enables style to be reached from login page / before authentication.
*/
- @RequestMapping( value = { "/style", "/style.js", "/style/external.js" }, method = RequestMethod.GET )
+ @RequestMapping( value = { "/style", "/style/external" }, method = RequestMethod.GET )
public void getCustomStyle( HttpServletResponse response, Writer writer )
throws IOException
{
@@ -113,7 +113,7 @@
writer.write( content );
}
- @RequestMapping( value = { "/style", "/style.js" }, method = RequestMethod.POST, consumes = "text/css" )
+ @RequestMapping( value = "/style", method = RequestMethod.POST, consumes = "text/css" )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void postCustomStyle( @RequestBody String content, HttpServletResponse response )
{
@@ -124,7 +124,7 @@
}
}
- @RequestMapping( value = { "/style", "/style.js" }, method = RequestMethod.DELETE )
+ @RequestMapping( value = "/style", method = RequestMethod.DELETE )
@PreAuthorize( "hasRole('ALL') or hasRole('F_INSERT_CUSTOM_JS_CSS')" )
public void removeCustomStyle( HttpServletResponse response )
{
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2014-09-15 23:04:48 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/cacheManifest.vm 2014-10-17 13:04:14 +0000
@@ -17,7 +17,7 @@
css/widgets.css?_rev=$!{buildRevision}
css/print.css?_rev=$!{buildRevision}
../dhis-web-dataentry/style/dhis-web-dataentry.css?_rev=$!{buildRevision}
-../api/files/style.css?_rev=$!{buildRevision}
+../api/files/style?_rev=$!{buildRevision}
../favicon.ico
javascripts/es5-shim.min.js?_rev=$!{buildRevision}
javascripts/es5-sham.min.js?_rev=$!{buildRevision}
@@ -48,7 +48,7 @@
javascripts/dhis2/dhis2.appcache.js?_rev=$!{buildRevision}
javascripts/jQuery/jquery.cookie.js?_rev=$!{buildRevision}
../main.js?_rev=$!{buildRevision}
-../api/files/script.js?_rev=$!{buildRevision}
+../api/files/script?_rev=$!{buildRevision}
ouwt/ouwt.js?_rev=$!{buildRevision}
fonts/LiberationSans-Regular-webfont.eot
fonts/LiberationSans-Regular-webfont.woff
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2014-09-12 07:25:30 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/dhis-web-commons/security/login.vm 2014-10-17 13:04:14 +0000
@@ -9,7 +9,7 @@
<script type="text/javascript" src="login.js"></script>
<link type="text/css" rel="stylesheet" href="../css/widgets.css">
<link type="text/css" rel="stylesheet" href="../css/login.css">
- <link type="text/css" rel="stylesheet" href="../../api/files/style/external.js" />
+ <link type="text/css" rel="stylesheet" href="../../api/files/style/external" />
</head>
<body class="loginPage">
<h1 style="display:none">$!encoder.htmlEncode( ${applicationTitle} )</h1>
=== modified file 'dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm'
--- dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-10-01 04:13:54 +0000
+++ dhis-2/dhis-web/dhis-web-commons-resources/src/main/webapp/main.vm 2014-10-17 13:04:14 +0000
@@ -18,7 +18,7 @@
#foreach ( $style in $stylesheets )
<link type="text/css" rel="stylesheet" href="${style}?_rev=$!{buildRevision}">
#end
- <link type="text/css" rel="stylesheet" href="../api/files/style.css?_rev=$!{buildRevision}" />
+ <link type="text/css" rel="stylesheet" href="../api/files/style?_rev=$!{buildRevision}" />
<link rel="shortcut icon" href="../favicon.ico" />
<script type="text/javascript">
@@ -85,7 +85,7 @@
#foreach( $javascript in $javascripts )
<script type="text/javascript" src="${javascript}?_rev=$!{buildRevision}"></script>
#end
- <script type="text/javascript" src="../api/files/script.js?_rev=$!{buildRevision}"></script>
+ <script type="text/javascript" src="../api/files/script?_rev=$!{buildRevision}"></script>
<!-- Create global system calendar -->
<script>
dhis2.period.format = '$dateFormat.js';
=== modified file 'dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml'
--- dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2014-09-30 12:29:45 +0000
+++ dhis-2/dhis-web/dhis-web-commons/src/main/resources/META-INF/dhis/security.xml 2014-10-17 13:04:14 +0000
@@ -23,7 +23,7 @@
<sec:http pattern="/dhis-web-commons/css/**" security="none" />
<sec:http pattern="/dhis-web-commons/flags/**" security="none" />
<sec:http pattern="/dhis-web-commons/fonts/**" security="none" />
- <sec:http pattern="/api/files/style/external.js" security="none" />
+ <sec:http pattern="/api/files/style/external" security="none" />
<sec:http pattern="/external-static/**" security="none" />
<sec:http pattern="/favicon.ico" security="none" />