CGI Form Submissions
uC-HTTPs supports HTML form submissions through the POST method. The following POST Internet media type are supported:
"application/x-www-form-urlencoded"
is the default format for encoding key-value pairs when a web browser sends a POST request from a web form element."multipart/form-data"
is the format that must be used when uploading large amount of data such as a file on a web server. It must be specified in the form tag as example:
<form action="upload.html" ENCTYPE="multipart/form-data" method="post">
When the form is posted, the web server will process the POST action and will invoke the callback with a list of key-value pair transmitted. Assuming the HTML page that look like this:
...
When the client send the request, the web server should call the callback function with the following key pair values items:
Key-Name: "textbox1", Key-Value: "Text Box 1 value"
Key-Name: "textbox2", Key-Value: "Text Box 2 value"
Key-Name: "submit", Key-Value: "Submit"
Each key pair value are stored internally to a list, when all key value pairs have been received the list is posted to the upper application using a callback function called 'GGI post' function. Since all connections are processing within only 1 task it is very important that all hook functions are non-blocking and can be executed quickly. See section 4-12-8 “CGI Post” on page 67 for further details about the implementation to this hook function.
...