diff options
author | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-14 08:43:05 (GMT) |
---|---|---|
committer | Stefan Radomski <radomski@tk.informatik.tu-darmstadt.de> | 2013-04-14 08:43:05 (GMT) |
commit | 01e7e16d34b23b1198455809860abe4e43d9606a (patch) | |
tree | 8b184a60e812a2cd835d15cb304d6a46792ca9e3 /apps/samples/vrml | |
parent | a22c9ab9c1a72bee6802dc8ada771930253f140b (diff) | |
download | uscxml-01e7e16d34b23b1198455809860abe4e43d9606a.zip uscxml-01e7e16d34b23b1198455809860abe4e43d9606a.tar.gz uscxml-01e7e16d34b23b1198455809860abe4e43d9606a.tar.bz2 |
Apps working again
Diffstat (limited to 'apps/samples/vrml')
-rw-r--r-- | apps/samples/vrml/vrml-server.scxml | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/apps/samples/vrml/vrml-server.scxml b/apps/samples/vrml/vrml-server.scxml index 0d6517c..6f376e8 100644 --- a/apps/samples/vrml/vrml-server.scxml +++ b/apps/samples/vrml/vrml-server.scxml @@ -255,6 +255,9 @@ <!-- Idle here --> <state id="idle"> + <!--onentry> + <log expr="_event" /> + </onentry --> <transition event="http.get" target="idle" cond=" _event.data.pathComponent.length >= 2 && _event.data.pathComponent[_event.data.pathComponent.length - 1].indexOf('.') !== -1"> @@ -275,19 +278,19 @@ <script> //print("Sending " + processed[_event['fileStruct'].key][_event['fileStruct'].format].path + "\n"); </script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Connection" value="close" /> <header name="Access-Control-Allow-Origin" value="*" /> <content fileexpr="processed[_event['fileStruct'].key][_event['fileStruct'].format].path" /> - </response> + </respond> <else> <if cond="_event.name.endsWith('postponed')"> <!-- A postponed event we couldn't answer --> - <response status="404" requestexpr="_event.origin"> + <respond status="404" to="_event.origin"> <header name="Connection" value="close" /> - </response> + </respond> <else> <script> print("Processing outfile " + _event['dest'] + " from model " + _event['file'] + "\n"); @@ -322,9 +325,9 @@ </if> <else> <!-- There is no such model --> - <response status="404" requestexpr="_event.origin"> + <respond status="404" to="_event.origin"> <header name="Connection" value="close" /> - </response> + </respond> </else> </if> </transition> @@ -336,58 +339,58 @@ _event.data.pathComponent.length == 2 && _event.data.pathComponent[1] === 'models'"> <script>//dump(_event)</script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Connection" value="close" /> <header name="Content-Type" value="application/json" /> <header name="Access-Control-Allow-Origin" value="*" /> <content expr="models" /> - </response> + </respond> </transition> <transition event="http.get" target="idle" cond=" _event.data.pathComponent.length == 2 && _event.data.pathComponent[1] === 'processed'"> <script>//dump(_event)</script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Connection" value="close" /> <header name="Content-Type" value="application/json" /> <header name="Access-Control-Allow-Origin" value="*" /> <content expr="processed" /> - </response> + </respond> </transition> <transition event="http.get" target="idle" cond=" _event.data.pathComponent.length == 2 && _event.data.pathComponent[1] === 'wrls'"> <script>//dump(_event)</script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Connection" value="close" /> <header name="Content-Type" value="application/json" /> <header name="Access-Control-Allow-Origin" value="*" /> <content expr="wrls" /> - </response> + </respond> </transition> <!-- request for topmost list of all files --> <transition event="http.get" target="idle" cond=" _event.data.pathComponent.length == 1"> <script>//dump(_event);</script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Connection" value="close" /> <header name="Content-Type" value="application/json" /> <header name="Access-Control-Allow-Origin" value="*" /> <content expr="overviewList()" /> - </response> + </respond> </transition> <!-- XHR CORS preflight response --> <transition event="http.options" target="idle"> <script>dump(_event);</script> - <response status="200" requestexpr="_event.origin"> + <respond status="200" to="_event.origin"> <header name="Access-Control-Allow-Origin" value="*" /> <header name="Access-Control-Allow-Methods" value="GET, OPTIONS" /> <header name="Access-Control-Allow-Headers" value="X-Requested-With" /> - </response> + </respond> </transition> </state> |