CN103347038A - Method of WEB server for processing http messages - Google Patents

Method of WEB server for processing http messages Download PDF

Info

Publication number
CN103347038A
CN103347038A CN2013102108209A CN201310210820A CN103347038A CN 103347038 A CN103347038 A CN 103347038A CN 2013102108209 A CN2013102108209 A CN 2013102108209A CN 201310210820 A CN201310210820 A CN 201310210820A CN 103347038 A CN103347038 A CN 103347038A
Authority
CN
China
Prior art keywords
web server
message
http
function
file
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN2013102108209A
Other languages
Chinese (zh)
Inventor
张珠明
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN WDK TECHNOLOGY Co Ltd
Shanghai Feixun Data Communication Technology Co Ltd
Original Assignee
SHENZHEN WDK TECHNOLOGY Co Ltd
Shanghai Feixun Data Communication Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN WDK TECHNOLOGY Co Ltd, Shanghai Feixun Data Communication Technology Co Ltd filed Critical SHENZHEN WDK TECHNOLOGY Co Ltd
Priority to CN2013102108209A priority Critical patent/CN103347038A/en
Publication of CN103347038A publication Critical patent/CN103347038A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention discloses a method of a WEB server for processing http messages. The method comprises the steps of receiving the http messages by the WEB server; checking a local file type list, wherein function interfaces which conduct different kinds of handling on different file types are listed by the local file type list; calling the manipulation functions through the interfaces, and returning data to a remote client after the handling. With the method, the process of data handling is simplified by checking the local file types and by means of the function interfaces to call the manipulation functions corresponding to the file types, complexity of codes is reduced, and limited resources of a system are saved.

Description

A kind of WEB server process http method of message
Technical field
The present invention relates to communication technical field, particularly relate to a kind of WEB server process http method of message.
Background technology
The webserver also claims web server or web server, and major function provides network information and browses service and the network equipment is carried out remote operation and configuration.Web server can be resolved (handles) http protocol.When Web server receives a HTTP request (request), can return a http response (response), for example send a html page back to.In order to handle a request (request), Web server can respond (response) static page or picture, carry out page jump (redirect), perhaps entrust the generation of dynamic response (dynamic response) (delegate) to give for example CGI scripting of some other program, JSP (JavaServer Pages) script, servlets, ASP (Active Server Pages) script, server end (server-side) JavaScript, perhaps other server end (server-side) technology.Browser can be browsed in the response (response) that the program of common server end (server-side) can produce a HTML.
(delegation model) is very simple for the agent model of Web server.When a request (request) was sent in the Web server, it is simple program (translator's notes: server side scripts) that request (request) passed to can well processing request (request) only.Web server only provides one can carry out server end (server-side) program and return the environment of (program produces) response (response), and can not exceed term of reference.Server end (server-side) program has transaction (transaction processing) usually, and database connects (database connectivity) and message functions such as (messaging).
Summary of the invention
Based on this, be necessary to provide a kind of WEB server process http method of message of saving system resource.
A kind of WEB server process http method of message comprises:
The WEB server is received the http message;
Check the local file list of types, described local file list of types has been listed the function interface of different file types being made different disposal;
Call the processing function by function interface, after disposing data are returned Terminal Server Client.
Among embodiment, also comprise therein:
When the file type of checking does not exist, return error message.
Among embodiment, also comprise therein:
Described file type comprises html form and cgi form.
Among embodiment, the processing function during the html form comprises therein:
Check whether this html file exists;
If then send the html file;
Otherwise return error message.
Among embodiment, the processing function during the cgi form comprises therein:
Check the cgi function list;
Parameter is passed to corresponding callback function;
Dispose the result is returned Terminal Server Client.
Therein among embodiment, after receiving the step of http message, the WEB server also comprises:
Http message safety certification, http message through safety certification then enter next step, otherwise return error message.
After adopting the present invention, by checking the local file type, function interface calls the processing function of respective file type by this, has simplified the flow process that data are handled, and has reduced the complexity of code, has saved system's Limited resources.
Description of drawings
The WEB server process http method of message flow chart that Fig. 1 provides for one embodiment of the invention;
The processing function flow chart of the html form in the WEB server process http method of message that Fig. 2 provides for one embodiment of the invention;
The processing function flow chart of the cgi form in the WEB server process http method of message that Fig. 3 provides for one embodiment of the invention;
The WEB server process http method of message flow chart that Fig. 4 provides for another embodiment of the present invention.
Embodiment
In order to make purpose of the present invention, technical scheme and advantage clearer, below in conjunction with drawings and Examples, the present invention is described in more detail.Should be appreciated that specific embodiment described herein only in order to explaining the present invention, and be not used in restriction the present invention.
Consult Fig. 1, an embodiment's provided by the invention, comprising:
Step S101, the WEB server is received the http message;
Step S102 checks the local file list of types, and the local file list of types has been listed the function interface of different file types being made different disposal;
Listed different file types and made the function interface of different disposal, dissimilar files has different processing functions, and the html form has the processing function of html, and the cgi form has the processing function of cgi.
Step S103 handles function by interface interchange, after disposing data is returned Terminal Server Client;
Step S104 when the file type of checking does not exist, returns error message.
This step can be omitted, and when this step, error message can be returned, and does not then have the result and returns.
Consult Fig. 2, be the processing function flow chart of the html form in the WEB server process http method of message among Fig. 1.
Handle the processing method of html form, as follows:
Step S201 checks whether this html file exists;
Check and whether have this html file in the local file.
Step S202 if this html file exists, then sends the html file;
Step S203 if this html file does not exist, then returns error message.
Consult Fig. 3, be the processing function flow chart of the cgi form in the WEB server process http method of message among Fig. 1.
Handle the processing method of cgi form, as follows:
Step S301 checks the cgi function list;
Step S302 passes to corresponding callback function with parameter;
Step S303 disposes the result is returned Terminal Server Client.
Handle the processing method of cgi form, proposed the cgi function list, call the callback function by searching the corresponding function list of cgi, saved the lengthy and tedious process that tradition is checked environmental variance, saved system resource.
Consult Fig. 4, the WEB server process http method of message flow chart that provides for another embodiment of the present invention.
Step S401, the WEB server is received the http message;
Step S402, http message safety certification;
If the message safety certification is not passed through, then forward step S403 to, the person does not forward step S404 to.
Step S403, the http message does not through safety certification return error message;
Step S404 checks the local file list of types, and the local file list of types has been listed the function interface of different file types being made different disposal;
Listed different file types and made the function interface of different disposal, dissimilar files has different processing functions, and the html form has the processing function of html, and the cgi form has the processing function of cgi.
Step S405 handles function by interface interchange, after disposing data is returned Terminal Server Client;
Step S406 when the file type of checking does not exist, returns error message.
After adopting the present invention, by checking the local file type, function interface calls the processing function of respective file type by this, has simplified the flow process that data are handled, and has reduced the complexity of code, has saved system's Limited resources.
After adopting method of the present invention, the above embodiment has only expressed several execution mode of the present invention, and it describes comparatively concrete and detailed, but can not therefore be interpreted as the restriction to claim of the present invention.Should be pointed out that for the person of ordinary skill of the art without departing from the inventive concept of the premise, can also make some distortion and improvement, these all belong to protection scope of the present invention.Therefore, the protection range of patent of the present invention should be as the criterion with claims.

Claims (6)

1. a WEB server process http method of message is characterized in that, comprising:
The WEB server is received the http message;
Check the local file list of types, described local file list of types has been listed the function interface of different file types being made different disposal;
Call the processing function by function interface, after disposing data are returned Terminal Server Client.
2. WEB server process http method of message according to claim 1 is characterized in that, also comprises:
When the file type of checking does not exist, return error message.
3. WEB server process http method of message according to claim 1 is characterized in that described file type comprises html form and cgi form.
4. WEB server process http method of message according to claim 3 is characterized in that the processing function during the html form comprises:
Check whether this html file exists;
If then send the html file;
Otherwise return error message.
5. WEB server process http method of message according to claim 3 is characterized in that the processing function during the cgi form comprises:
Check the cgi function list;
Parameter is passed to corresponding callback function;
Dispose the result is returned Terminal Server Client.
6. according to described any one the WEB server process http method of message of claim 1-5, it is characterized in that, after the WEB server is received the step of http message, also comprise:
Http message safety certification, http message through safety certification then enter next step, otherwise return error message.
CN2013102108209A 2013-05-30 2013-05-30 Method of WEB server for processing http messages Pending CN103347038A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN2013102108209A CN103347038A (en) 2013-05-30 2013-05-30 Method of WEB server for processing http messages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN2013102108209A CN103347038A (en) 2013-05-30 2013-05-30 Method of WEB server for processing http messages

Publications (1)

Publication Number Publication Date
CN103347038A true CN103347038A (en) 2013-10-09

Family

ID=49281812

Family Applications (1)

Application Number Title Priority Date Filing Date
CN2013102108209A Pending CN103347038A (en) 2013-05-30 2013-05-30 Method of WEB server for processing http messages

Country Status (1)

Country Link
CN (1) CN103347038A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453573A (en) * 2016-10-20 2017-02-22 凌云天博光电科技股份有限公司 Method and system for processing CGI request in HTTP server
CN110222018A (en) * 2019-05-14 2019-09-10 联动优势科技有限公司 Data summarization executes method and device
CN110222105A (en) * 2019-05-14 2019-09-10 联动优势科技有限公司 Data summarization processing method and processing device

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030051027A1 (en) * 2001-08-24 2003-03-13 International Business Machines Corporation Apparatus and method for determining compatibility of web sites with designated requirements based on functional characteristics of the web sites
US6857006B1 (en) * 1998-09-16 2005-02-15 Mitsui & Co., Ltd. Multimedia direct communication system linked with HTTP protocol
CN1627761A (en) * 2003-09-19 2005-06-15 株式会社理光 Apparatus and method for processing information
CN1770048A (en) * 2005-09-29 2006-05-10 上海电器科学研究所(集团)有限公司 Embedded web page server
CN1929399A (en) * 2006-09-12 2007-03-14 成都迈普产业集团有限公司 Embedded Web network management system and its interactive method
CN102239680A (en) * 2011-03-09 2011-11-09 华为技术有限公司 Method and device for web application hosting

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6857006B1 (en) * 1998-09-16 2005-02-15 Mitsui & Co., Ltd. Multimedia direct communication system linked with HTTP protocol
US20030051027A1 (en) * 2001-08-24 2003-03-13 International Business Machines Corporation Apparatus and method for determining compatibility of web sites with designated requirements based on functional characteristics of the web sites
CN1627761A (en) * 2003-09-19 2005-06-15 株式会社理光 Apparatus and method for processing information
CN1770048A (en) * 2005-09-29 2006-05-10 上海电器科学研究所(集团)有限公司 Embedded web page server
CN1929399A (en) * 2006-09-12 2007-03-14 成都迈普产业集团有限公司 Embedded Web network management system and its interactive method
CN102239680A (en) * 2011-03-09 2011-11-09 华为技术有限公司 Method and device for web application hosting

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
刘殿敏 等: "《基于Linux嵌入式HTTP网络服务器的设计与实现》", 《计算机工程》 *
陶雄飞 等: "《基于嵌入式WEB服务器的数字电视接收终端的设计》", 《电子技术应用》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106453573A (en) * 2016-10-20 2017-02-22 凌云天博光电科技股份有限公司 Method and system for processing CGI request in HTTP server
CN110222018A (en) * 2019-05-14 2019-09-10 联动优势科技有限公司 Data summarization executes method and device
CN110222105A (en) * 2019-05-14 2019-09-10 联动优势科技有限公司 Data summarization processing method and processing device
CN110222105B (en) * 2019-05-14 2021-06-29 联动优势科技有限公司 Data summarization processing method and device

Similar Documents

Publication Publication Date Title
US8769125B2 (en) Method and apparatus for ensuring transport of user agent information
CN104102537B (en) A kind of application call method and user terminal
US10015226B2 (en) Methods for making AJAX web applications bookmarkable and crawlable and devices thereof
US9819563B2 (en) Failure management for electronic transactions
US10958735B2 (en) Client connection method and system
CN106549989B (en) Data transmission method and system, user terminal and application server
CN107766509B (en) Method and device for static backup of webpage
CN104038510A (en) IOS system transparent agent realization method and system
CN104144206A (en) Method, system and device for loading interface
CN103347038A (en) Method of WEB server for processing http messages
CN112015383A (en) Login method and device
KR101349201B1 (en) Apparatus for interoperability between Web-browser and Local-resources in the Mobile Device and method thereof
CN102629943B (en) A kind of method of mobile broadband equipment and mobile broadband service process thereof
CN110673970B (en) Cross-process calling system and method based on web application
CN102148869B (en) Method and device for JAVA application to transfer information to local
CN105245535A (en) Multi-client uniform management method and system
CN110516189B (en) Interface self-service method, device, computer equipment and storage medium
AU2018390863B2 (en) Computer system and method for extracting dynamic content from websites
CN102739882B (en) Seating system, seating system client and processing method of seating system client
CN104346228A (en) Application program sharing method and terminal
CN110602194B (en) IOT message subscription method, IOT message subscription device and computer readable storage medium
CN104978199A (en) Plug-in application method and device used for multiple browsers
CN111953718A (en) Page debugging method and device
JP2015001777A (en) System and method for simultaneously debugging a plurality of mobile terminals
CN113766437B (en) Short message sending method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
EXSB Decision made by sipo to initiate substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20131009

RJ01 Rejection of invention patent application after publication