嵌入式服务器源码 可执行动态页,可以自由修改

源代码在线查看: webssecurityhandler.htm

软件大小: 829 K
上传用户: ying_min
关键词: 嵌入式 可执行 动态 修改
下载地址: 免注册下载 普通下载 VIP

相关代码

																websSecurityHandler -- GoAhead WebServer API																				 				  				websSecurityHandler 				GoAhead WebServer API 				GoAhead EMF  Synopsis URL handler for the 				default security policy.Prototype #include "webs.h" 								 int websSecurityHandler(webs_t wp, char_t *url, char_t *path, char_t *query); 				Parameters 				 wp Web server connection handle. 				 url Request URL.  path 				Request path portion of the URL.  query 				Query string portion of the URL.DescriptionwebsSecurityHandler 				implements the default security policy. It operates as a URL handler and is installed 				to run as the very first URL handler. If you require a replacement security policy, 				delete the websSecurityHandler and install your own with websUrlHandlerDefine. 				The websSetPassword procedure defines the security 				password. The security handler will require all non-local requests (those from 				a remote system) to supply this password. The user name is ignored. To use the 				password feature, the Security Handler 				must be installed by calling websHandlerDefine 				for websSecurityHandler. This in done automatically in the GoAhead EMF. If you 				are using the GoAhead WebServer, this should be done in your main program. See 				main.c for examples.The security handler should return 0 if the request 				is acceptable. It should return 1 to deny the request. When websSecurityHandler 				denies a request, it first returns a 401 response code to cause the user's browser 				to prompt for a username and password. Use websGetRequestPassword 				to get the password supplied with the current request.Return Value 				Returns 0 if the request is acceptable. Returns 1 if the request is denied.ExampleThe 				following code will install a new security handler: websSecurityDelete(); 				websUrlHandlerDefine("", mySecurityHandler, WEBS_HANDLER_FIRST); Stability 				ClassificationStable.See Also websGetRequestFlags, 				websGetRequestIpaddr, websGetRequestPassword, 				websGetRequestType 															

相关资源