Goahead2.5 source code analysis-7-form request processing (Form. c)

Source: Internet
Author: User
Form. C (Form request processing)

Bytes -----------------------------------------------------------------------------------------------------------------

Int websformhandler (webs_t WP, char_t * urlprefix, char_t * webdir, int Arg, char_t * URL, char_t * path, char_t * query)

Function: Process Form requests.

Note:

1. According to the form Path, separate the form program name. For example,/goform/My is to separate the goform, which must start with/in the path;

2. Search for the form program in formsymtab Based on the found form program name, and then execute it.

Bytes -----------------------------------------------------------------------------------------------------------------

Int websformdefine (char_t * Name, void (* fN) (webs_t WP, char_t * path, char_t * query ))

Function: registers a form program.

Note: name is the name, that is, my In/goform/My. FN is the parameter and is registered in form= AB.

Bytes -----------------------------------------------------------------------------------------------------------------

Void websformopen ()

Function: enables sys table.

Note:

Bytes -----------------------------------------------------------------------------------------------------------------

Void websformclose ()

Function: Disable sys table.

Note:

Bytes -----------------------------------------------------------------------------------------------------------------

Void websheader (webs_t WP)

Function: outputs web header messages and <HTML>

Note: HTTP/1.0 200 OK \ n, server: GoAhead/2.5.0 \ r \ n, Pragma: No-Cache \ n, cache-control: no-Cache \ n, Content-Type: text/html \ n, \ n, <HTML> \ n

Note: The header message and HTML object are separated by \ n.

The main function of these messages is to disable page caching. for IE 6 browsers, there is no function, or cache!

Bytes -----------------------------------------------------------------------------------------------------------------

 

Void websmsgheader (webs_t WP)

Function: outputs the Web header message.

Note: HTTP/1.0 200 OK \ n, server: GoAhead \ r \ n, Pragma: No-Cache \ n, and cache-control: no-Cache \ n, Content-Type: text/html \ n, \ n.

Bytes -----------------------------------------------------------------------------------------------------------------

 

Void websfooter (webs_t WP)

Function: Output

Note:

Bytes -----------------------------------------------------------------------------------------------------------------

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.