Patch for FCL-web, bug fixes and improvements
Original Reporter info from Mantis: bobo
-
Reporter name: Attila Borka
Original Reporter info from Mantis: bobo
- Reporter name: Attila Borka
Description:
-
Added custom header handling to CGI and Apache applications
(ex: can send "Pragma: no-cache" header now, can do redirects, etc.) -
Added SendRedirect(const TargetURL:String) to CGI and Apache applications
("302 Found" for HTTP/1.0 and "307 Temporary Redirect" for HTTP/1.1) -
Fixed a bug for Apache applications that returned with the same action
results after any action with the use of TFPTemplate called
(the FPTemplate which is a global property for a web module was not reset
after an action was handled) -
Fixed a bug for Apache applications to pass the Status Code and Content
Encoding to the web server in the response.
(ex: can send 'Content-Type: text/html; charset=ISO-8859-2' now to the clients,
redirects need it too to pass the status code, etc.) -
Fixed the header name/value pair passing for Apache applications
(do not need the extra space for the header values, apache puts it there
automatically) -
Minor changes to the template usage example projects in some comments
(the Template:TFPTemplate is a property of the web module, not the web action) -
Changed the behaviour for CGI and Apache applications when non existing
actions are called. Until now, an error message was displayed. Now the default
action is called if it exists. If not, an error message is displayed.
Additional information:
Includes the changes posted in
http://bugs.freepascal.org/view.php?id=13250
and
http://bugs.freepascal.org/view.php?id=13228
If this patch is applied, the above two can be closed as done.