developer:clibrary

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Last revision Both sides next revision
developer:clibrary [2008/01/28 09:54]
nell
developer:clibrary [2008/01/28 09:55]
nell
Line 55: Line 55:
 ==== Warning ==== ==== Warning ====
  Use an HTML form with the action pointing to the cgi file. If you run the program without any form fields sent through either GET or POST you will probably receive an "​Internal Server Error."​ This is because cgi-html will output an error message that there are no form fields, before outputting a content-type,​ which is necessary for normal http operation. You can circumvent this error by adding an "​if"​ statement to check if there is a QUERY_STRING and if the CONTENT_LENGTH is greater than zero in the environment variables. Then execute the command head = cgi_input_parse();​ or else print your own error message with a proper content-type.  Use an HTML form with the action pointing to the cgi file. If you run the program without any form fields sent through either GET or POST you will probably receive an "​Internal Server Error."​ This is because cgi-html will output an error message that there are no form fields, before outputting a content-type,​ which is necessary for normal http operation. You can circumvent this error by adding an "​if"​ statement to check if there is a QUERY_STRING and if the CONTENT_LENGTH is greater than zero in the environment variables. Then execute the command head = cgi_input_parse();​ or else print your own error message with a proper content-type.
 +
 +===== Example Code =====
  
 <code c> <code c>
developer/clibrary.txt ยท Last modified: 2008/06/17 15:13 by vladg

Page Tools