summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compiler/GFServer.hs15
-rw-r--r--src/www/gfse/Makefile2
-rw-r--r--src/www/gfse/index.html2
-rw-r--r--src/www/gfse/share.html2
-rw-r--r--src/www/index.html2
5 files changed, 12 insertions, 11 deletions
diff --git a/src/compiler/GFServer.hs b/src/compiler/GFServer.hs
index bc5bdbdaf..4b796efce 100644
--- a/src/compiler/GFServer.hs
+++ b/src/compiler/GFServer.hs
@@ -25,21 +25,22 @@ import GF.Infra.UseIO(readBinaryFile,writeBinaryFile)
import qualified PGFService as PS
import qualified ExampleService as ES
import Paths_gf(getDataDir)
-import RunHTTP(Options(..),cgiHandler)
+import RunHTTP(cgiHandler)
-- * HTTP server
server execute1 state0 =
do state <- newMVar M.empty
cache <- PS.newPGFCache
datadir <- getDataDir
- let options = Options { documentRoot = datadir</>"www", port = 41296 }
+ let root = datadir</>"www"
+ port = 41296
putStrLn $ "Starting HTTP server, open http://localhost:"
- ++show (port options)++"/ in your web browser."
- initServer (port options)
- (modifyMVar state . handle options state0 cache execute1)
+ ++show port++"/ in your web browser."
+ setCurrentDirectory root
+ initServer port (modifyMVar state . handle state0 cache execute1)
-- * HTTP request handler
-handle options state0 cache execute1
+handle state0 cache execute1
rq@(Request method URI{uriPath=upath,uriQuery=q} hdrs body) state =
do let qs = decodeQ $
case method of
@@ -63,7 +64,7 @@ handle options state0 cache execute1
where path = translatePath rpath
_ -> return (state,resp400 upath)
where
- root = documentRoot options
+ root = "."
translatePath rpath = root</>rpath -- hmm, check for ".."
diff --git a/src/www/gfse/Makefile b/src/www/gfse/Makefile
index 00a97b337..f2e33c3fb 100644
--- a/src/www/gfse/Makefile
+++ b/src/www/gfse/Makefile
@@ -4,4 +4,4 @@ save: save.hs
install::
@make save
- rsync -avz --exclude .DS_Store P *.html *.css *.js ../../runtime/javascript/minibar/support.js *.cgi *.manifest save www.grammaticalframework.org:/usr/local/www/GF/demos/gfse
+ rsync -avz --exclude .DS_Store P *.html *.css *.js *.cgi *.manifest save www.grammaticalframework.org:/usr/local/www/GF/demos/gfse
diff --git a/src/www/gfse/index.html b/src/www/gfse/index.html
index c683a1ebf..52c96a34f 100644
--- a/src/www/gfse/index.html
+++ b/src/www/gfse/index.html
@@ -37,7 +37,7 @@ HTML
<a href="about.html">About</a>
<pre id=debug></pre>
<script type="text/javascript" src="config.js"></script> <!-- optional -->
-<script type="text/javascript" src="support.js"></script>
+<script type="text/javascript" src="../minibar/support.js"></script>
<script type="text/javascript" src="localstorage.js"></script>
<script type="text/javascript" src="gf_abs.js"></script>
<script type="text/javascript" src="example_based.js"></script>
diff --git a/src/www/gfse/share.html b/src/www/gfse/share.html
index 260a7b066..70bd44526 100644
--- a/src/www/gfse/share.html
+++ b/src/www/gfse/share.html
@@ -14,7 +14,7 @@
<hr>
<address></address>
<!-- hhmts start --> Last modified: Mon Oct 10 20:29:01 CEST 2011 <!-- hhmts end -->
-<script type="text/javascript" src="support.js"></script>
+<script type="text/javascript" src="../minibar/support.js"></script>
<script type="text/javascript" src="localstorage.js"></script>
<script type="text/javascript" src="gf_abs.js"></script>
<script type="text/javascript" src="editor.js"></script>
diff --git a/src/www/index.html b/src/www/index.html
index b1aa24028..7a924e808 100644
--- a/src/www/index.html
+++ b/src/www/index.html
@@ -5,7 +5,7 @@
<title>GF web service</title>
<h1>GF web service</h1>
-<h2>Available web services</h2>
+<h2>Available web applications</h2>
<ul>
<li><a href="minibar/minibar.html">Minibar</a>