summaryrefslogtreecommitdiff
path: root/scripts/proxy
authorGiulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-08-30 15:56:53 (UTC)
committer Giulio Cesare Solaroli <giulio.cesare@clipperz.com>2013-08-30 21:23:42 (UTC)
commit20bea94ab6b91c85b171dcf86baba0a64169d508 (patch) (side-by-side diff)
tree6e38e91498dcdb861620eba1e237d1026fe79cc5 /scripts/proxy
parentbde3c7b98523112ade9c5bbf7390c4ecb494cd2e (diff)
downloadclipperz-20bea94ab6b91c85b171dcf86baba0a64169d508.zip
clipperz-20bea94ab6b91c85b171dcf86baba0a64169d508.tar.gz
clipperz-20bea94ab6b91c85b171dcf86baba0a64169d508.tar.bz2
First release of /delta version
Diffstat (limited to 'scripts/proxy') (more/less context) (ignore whitespace changes)
-rwxr-xr-xscripts/proxy/main.py19
1 files changed, 13 insertions, 6 deletions
diff --git a/scripts/proxy/main.py b/scripts/proxy/main.py
index 107ba16..8ce4989 100755
--- a/scripts/proxy/main.py
+++ b/scripts/proxy/main.py
@@ -29,3 +29,6 @@ class ClipperzTestSite(server.Site):
def getResourceFor(self, request):
- if request.uri.startswith('/json') or request.uri.startswith('/dump'):
+ uri = request.uri
+ uri = uri.split("?", 1)[0]
+ uri = uri.split("#", 1)[0]
+ if uri.startswith('/json') or uri.startswith('/dump'):
request.site = self
@@ -35,3 +38,3 @@ class ClipperzTestSite(server.Site):
else:
- pathParts = request.uri.split('/')
+ pathParts = uri.split('/')
version = pathParts[1]
@@ -42,3 +45,7 @@ class ClipperzTestSite(server.Site):
result = static.File(absoluteFilePath, contentType)
-
+ elif pathParts[2].endswith('.webapp'):
+ contentType = 'application/x-web-app-manifest+json'
+# absoluteFilePath = os.path.join(projectTargetDir(), 'dev', version, pathParts[2])
+ absoluteFilePath = os.path.join(projectBaseDir(), 'frontend', version, 'properties', pathParts[2])
+ result = static.File(absoluteFilePath, contentType)
else:
@@ -56,3 +63,3 @@ class ClipperzTestSite(server.Site):
if resourceType == 'images':
- fileExtension = os.path.splitext(request.uri)[1]
+ fileExtension = os.path.splitext(uri)[1]
if fileExtension == '.png':
@@ -77,3 +84,3 @@ class ClipperzTestSite(server.Site):
- absoluteFilePath = basePath + request.uri
+ absoluteFilePath = basePath + uri
@@ -87,3 +94,3 @@ class ClipperzTestSite(server.Site):
def main ():
- site = ClipperzTestSite(proxy.ReverseProxyResource('localhost', 8084, '/java-backend'))
+ site = ClipperzTestSite(proxy.ReverseProxyResource('localhost', 8080, '/java-backend'))
reactor.listenTCP(8888, site)