1
0
forked from GitHub/gf-core
Commit Graph

22 Commits

Author SHA1 Message Date
hallgren
e0e6079c91 src/server: refactoring to isolate dependencies on the cgi/fastcgi packages
* Introducing the module CGI, re-exporting a subset of the cgi package. It
  might complete replace the cgi package in the future.
* Introducing the module CGIUtils, containing functions from FastCGIUtils that
  have nothing to do with fastcgi.

Some low level hackery with unsafePerformIO and global variables was left
in FastCGIUtils, but it is actually not used, neither for gf -server nor
exec/pgf-fcgi.hs.
2014-09-02 12:27:47 +00:00
hallgren
27da46a79d Cloud & PGF service: use Content-Type application/json for JSON output
This is in accordance with RFC 4627. http://tools.ietf.org/html/rfc4627
Use application/javascript for JSONP output.
2013-07-29 16:05:54 +00:00
hallgren
e07a74df01 Allow cross origin requests to GF cloud & PGF services
By adding a header

	Access-Control-Allow-Origin: *

to the HTTP responses, web browsers are informed that it is OK to call the
services from web pages hosted on other sites.

This is apparently supported in most modern browsers, so it should no longer
be necessary to resort to JSONP.

See https://developer.mozilla.org/en-US/docs/HTTP/Access_control_CORS
2013-07-25 16:04:43 +00:00
hallgren
1497fd863a PGF service: new command: download
This makes it possible to download PGF files from servers where the PGF service
is installed.

I am also considering making commmand=download the default instead of
command=grammar.
2013-01-09 13:28:45 +00:00
hallgren
d8d80693db pgf service: added a hook for external services
This is really reinventing CGI, people should learn how to write CGI scripts
instead...
TODO: better handling of temporary files
2011-08-22 15:34:44 +00:00
hallgren
505d99ec37 PGF web service: Use Content-Type text/javascript from JSON output
The Content-Type used to be text/json, but this caused warning messages in
some web browers.
2010-12-22 14:47:35 +00:00
hallgren
72d2d9b204 Split pgf-server into pgf-fcgi and pgf-http.
The dependency on the fastcgi package made pgf-server difficult to compile, so
it is now split into

  - pgf-fgci (main module in pgf-fcgi.hs), which is built only if fastcgi is
    already installed or if you turn on the fastcgi flag (e.g. by doing
    'cabal install -f fastcgi').

  - pgf-http (main module in pgf-http.hs) which is always built (and hopefully
    has no problematic dependencies.) 

The modules FastCGIUtils and PGFService no longer depend on fastcgi.
2010-11-26 14:30:51 +00:00
krasimir
c033bbccff fix: FastCGIUtils.outputHTML should do UTF8 encoding 2010-07-31 13:56:55 +00:00
krasimir
e3a279e457 now the PGF service communicates with Graphviz using UTF8 for the input and binary for the output 2010-04-22 14:01:08 +00:00
krasimir
9db279b24b the pgf service now compiles with the latest CGI package 2010-04-22 12:37:36 +00:00
krasimir
991a58badb TranslateApp now have browser for abstract syntax 2009-11-29 14:51:12 +00:00
krasimir
02bb6cc073 added tree visualizations in TranslateApp 2009-10-24 10:38:21 +00:00
krasimir
6a263f05aa Update FastCGIUtils.hs to work with GHC 6.10 2009-06-04 14:56:50 +00:00
krasimir
798380cbd3 hack for pgf-server for Windows 2009-01-25 15:07:29 +00:00
bjorn
7dbaae50a9 Fix permissions of pgf server error log. 2008-11-20 09:52:18 +00:00
bjorn
f1fcee964f pgf-server: write stderr to pgf-error.log, since lighttpd closes stderr for fastcgi processes. 2008-11-04 09:28:21 +00:00
bjorn
6633ae71f1 gf-server: move some general stuff to FastCGIUtils 2008-10-20 15:17:57 +00:00
bjorn
0205f341f5 (fastcgi) replace DataRef with a more general Cache type, which can hold several PGF grammars. 2008-10-17 14:12:53 +00:00
bjorn
f211fc10ca Multithreaded gf.fcgi. 2008-10-16 13:00:44 +00:00
bjorn
d1ebdf8154 gf-server: the readData function given to getData should be m a, not IO a. 2008-08-24 20:44:30 +00:00
bjorn
a8f0546574 Move CGIError stuff to FastCGIUtils. 2008-08-24 19:12:44 +00:00
bjorn
a7aa8fb981 Added first version of the GF FastCGI server. 2008-08-14 09:06:26 +00:00