diff options
| author | hallgren <hallgren@chalmers.se> | 2010-09-03 13:12:08 +0000 |
|---|---|---|
| committer | hallgren <hallgren@chalmers.se> | 2010-09-03 13:12:08 +0000 |
| commit | 5b09b82f312044a999d58cf484c59d45e00ad47a (patch) | |
| tree | bd433e7ee4456e717fbfbab070f5503da768ec1a /src/server/RunHTTP.hs | |
| parent | 9fc58ce0e7c00e5207d72225430bde9817c76bb0 (diff) | |
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")]
Diffstat (limited to 'src/server/RunHTTP.hs')
| -rw-r--r-- | src/server/RunHTTP.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/server/RunHTTP.hs b/src/server/RunHTTP.hs index cf536d054..c83f7c0a1 100644 --- a/src/server/RunHTTP.hs +++ b/src/server/RunHTTP.hs @@ -31,11 +31,13 @@ cgiReq (Request method uri hdrs body) = CGIRequest vars inputs body' ("SCRIPT_FILENAME",documentRoot++uriPath uri), ("QUERY_STRING",qs)] qs = case uriQuery uri of + '?':'&':s -> s -- httpd-shed bug workaround '?':s -> s s -> s inputs = map input $ queryToArguments qs -- assumes method=="GET" body' = BS.pack body - input (name,val) = (name,Input (BS.pack val) Nothing plaintext) - plaintext = ContentType "plain" "text" [] -
\ No newline at end of file + input (name,val) = (name,Input (BS.pack (map decode val)) Nothing plaintext) + plaintext = ContentType "text" "plain" [] + decode '+' = ' ' -- httpd-shed bug workaround + decode c = c |
