Commit Graph

8 Commits

Author SHA1 Message Date
hallgren
0e87a88f4b 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
550db69caa Fix UTF-8 decoding problem in gf -server
The package network-2.4.1.1 thoughlessly introduced a backward incompatible
change to the function Network.URI.unEscapeString, see

    f2168b1f89

This also affects the function Network.Shed.Httpd.queryToArguments, which is
used in GFServer.hs.

To remain compatible with older and newer versions of the network package,
we need to stay clear of queryToArguments and unEscapeString. A replacement
function has been added to server/URLEncoding.hs.
2013-06-13 08:23:48 +00:00
hallgren
b318509528 More functionality in "gf -server" mode
"gf -server" mode now includes PGF service and the services to support
example-based grammar writing. (But gf -server is not quite ready to replace
pgf-http yet...) 

Also bumped GF version number to 3.2.10-darcs
2011-10-10 16:16:16 +00:00
hallgren
be1830479f pgf-http: fix a bug that caused "+" to be treaded as " " in PGF service requests URLs.
This was a bug in my workaround for a bug in the httpd-shed package. It
made it impossible to use the glue token "&+" for Turkish input in the minibar,
for example.
2011-08-25 16:58:17 +00:00
hallgren
31c09c8846 RunHTTP.hs: remove hardcoded document root
The document root is now part of the arguments passed to runHTTP.
2010-12-17 16:33:54 +00:00
hallgren
af8645a2f3 pgf-server HTTP mode: support the Accept-Language header
It is needed for the userLanguage field in the grammar info from pgf-server
2010-09-10 11:20:49 +00:00
hallgren
cff7dfcf7b pgf-server HTTP mode: workaround for bugs in the httpd-shed package that prevented the fridge and translate web apps from working
queryToArguments "?&input=bla+bla"
           returns [("&input","bla+bla")]
 but should return [("input","bla bla")]
2010-09-03 13:12:08 +00:00
hallgren
ea67281820 Standalone HTTP version of pgf-server
pgf-server can now act as a standalone HTTP server. To activate this mode,
start it with

	pfg-server http

to use the default port number (41296), or give an explicit port number, e.g.,

	pgf-server http 8080

The HTTP server serves PGF files in the same way as the old FastCGI interface.
In addition, it also serves static files. The document root for static files
is the www subdirectory of the current directory where pgf-server is started.

In spite of these addition, backwards compatibility is maintaned. The old
FastCGI interface continues to work as before. (It is activated when
pgf-server is started without arguments.)
2010-09-01 14:08:52 +00:00