亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? htfilter.c

?? www工具包. 這是W3C官方支持的www支撐庫. 其中提供通用目的的客戶端的WebAPI: complete HTTP/1.1 (with caching, pipelining, PUT, POS
?? C
字號:
/***	BEFORE AND AFTER FILTERS****	(c) COPYRIGHT MIT 1995.**	Please first read the full copyright statement in the file COPYRIGH.**	@(#) $Id: HTFilter.c,v 2.38 1999/03/31 00:53:31 frystyk Exp $****	This module implrments a set of default filters that can be registerd**	as BEFORE and AFTER filters to the Net manager** Authors**	HFN	Henrik Frystyk, frystyk@w.org** History**	Jul 4, 96	Written*//* Library include files */#include "WWWLib.h"#include "WWWCache.h"#include "WWWHTTP.h"#include "HTLog.h"#include "HTAccess.h"#include "HTProxy.h"#include "HTRules.h"#include "HTFilter.h"					 /* Implemented here *//* ------------------------------------------------------------------------- *//***	Proxy and Gateway BEFORE filter**	-------------------------------**	Checks for registerd proxy servers or gateways and sees whether this**	request should be redirected to a proxy or a gateway. Proxies have**	higher priority than gateways so we look for them first!**	For HTTP/1.0 and HTTP/1.1 we may only send a full URL (including the**	host portion) to proxy servers. Therefore, we tell the Library whether**	to use the full URL or the traditional HTTP one without the host part.*/PUBLIC int HTProxyFilter (HTRequest * request, void * param, int mode){    HTParentAnchor * anchor = HTRequest_anchor(request);    char * addr = HTAnchor_physical(anchor);    char * physical = NULL;    if ((physical = HTProxy_find(addr))) {	HTRequest_setFullURI(request, YES);			  /* For now */	HTRequest_setProxy(request, physical);	HT_FREE(physical);#if 0	/* Don't paste the URLs together anymore */	StrAllocCat(physical, addr);	HTAnchor_setPhysical(anchor, physical);	#endif    } else if ((physical = HTGateway_find(addr))) {	/* 	** A gateway URL is crated by chopping off any leading "/" to make the	** host into part of path	*/	char * path =	    HTParse(addr, "", PARSE_HOST + PARSE_PATH + PARSE_PUNCTUATION);	char * gatewayed = HTParse((*path=='/') ? path+1 : path, physical, PARSE_ALL);	HTAnchor_setPhysical(anchor, gatewayed);	HT_FREE(path);	HT_FREE(gatewayed);	HTRequest_setFullURI(request, NO);	HTRequest_deleteProxy(request);    } else {	HTRequest_setFullURI(request, NO);			  /* For now */	HTRequest_deleteProxy(request);    }    return HT_OK;}/***	Rule Translation BEFORE Filter**	------------------------------**	If we have a set of rules loaded (see the Rule manager) then check**	before each request whether how that should be translated. The trick**	is that a parent anchor has a "address" which is the part from the URL**	we used when we created the anchor. However, it also have a "physical**	address" which is the place we are actually going to look for the**	resource. Hence this filter translates the physical address**	(if any translations are found)*/PUBLIC int HTRuleFilter (HTRequest * request, void * param, int mode){    HTList * list = HTRule_global();    HTParentAnchor * anchor = HTRequest_anchor(request);    char * addr = HTAnchor_physical(anchor);    char * physical = HTRule_translate(list, addr, NO);    if (!physical) {	HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,			   NULL, 0, "HTRuleFilter");	return HT_ERROR;    }    HTAnchor_setPhysical(anchor, physical);    HT_FREE(physical);    return HT_OK;}/***	Check the Memory Cache (History list) BEFORE filter**	---------------------------------------------------**	Check if document is already loaded. The user can define whether**	the history list should follow normal expiration or work as a**	traditional history list where expired documents are not updated.**	We don't check for anything but existence proof of a document**	associated with the anchor as the definition is left to the application*/PUBLIC int HTMemoryCacheFilter (HTRequest * request, void * param, int mode){    HTReload validation = HTRequest_reloadMode(request);    HTParentAnchor * anchor = HTRequest_anchor(request);    void * document = HTAnchor_document(anchor);    /*    **  We only check the memory cache if it's a GET method    */    if (HTRequest_method(request) != METHOD_GET) {	HTTRACE(CACHE_TRACE, "Mem Cache... We only check GET methods\n");	return HT_OK;    }    /*    **  If we are asked to flush the persistent cache then there is no reason    **  to do anything here - we're flushing it anyway. Also if no document    **  then just exit from this filter.    */    if (!document || validation > HT_CACHE_FLUSH_MEM) {	HTTRACE(CACHE_TRACE, "Mem Cache... No fresh document...\n");	return HT_OK;    }    /*    **  If we have a document object associated with this anchor then we also    **  have the object in the history list. Depending on what the user asked,    **  we can add a cache validator    */    if (document && validation != HT_CACHE_FLUSH_MEM) {	HTTRACE(CACHE_TRACE, "Mem Cache... Document already in memory\n");	return HT_LOADED;    }    return HT_OK;}/***	Error and Information AFTER filter**	----------------------------------**	It checks the status code from a request and generates an **	error/information message if required.*/PUBLIC int HTInfoFilter (HTRequest * request, HTResponse * response,			 void * param, int status){    HTParentAnchor * anchor = HTRequest_anchor(request);    char * uri = HTAnchor_address((HTAnchor*) anchor);    switch (status) {    case HT_RETRY: {        HTAlertCallback *cbf = HTAlert_find(HT_A_MESSAGE);	if (cbf) (*cbf)(request, HT_A_MESSAGE, HT_MSG_NULL, NULL,			HTRequest_error(request), NULL);	HTTRACE(PROT_TRACE, "Load End.... NOT AVAILABLE, RETRY AT %ld\n" _ 		    HTResponse_retryTime(response));        }        break;    case HT_NO_DATA:    {	/*	** The document was empty	*/	HTAlertCallback *cbf = HTAlert_find(HT_A_MESSAGE);	if (cbf) (*cbf)(request, HT_A_MESSAGE, HT_MSG_NULL, NULL,			HTRequest_error(request), NULL);	HTTRACE(PROT_TRACE, "Load End.... EMPTY: No content `%s\'\n" _ 		    uri ? uri : "<UNKNOWN>");	break;    }        case HT_LOADED:	HTTRACE(PROT_TRACE, "Load End.... OK: `%s\'\n" _ uri);	break;    default:    {	/*	** See if we have a function registered for outputting errors.	** If so then call it and present the message to the user	*/	HTAlertCallback *cbf = HTAlert_find(HT_A_MESSAGE);	if (cbf) (*cbf)(request, HT_A_MESSAGE, HT_MSG_NULL, NULL,			HTRequest_error(request), NULL);	HTTRACE(PROT_TRACE, "Load End.... Request ended with code %d\n" _ status);	break;    }    }    HT_FREE(uri);    return HT_OK;}/***	Redirection AFTER filter**	------------------------**	The redirection handler only handles redirections**	on the GET or HEAD method (or any other safe method)*/PUBLIC int HTRedirectFilter (HTRequest * request, HTResponse * response,			     void * param, int status){    HTMethod method = HTRequest_method(request);     HTAnchor * new_anchor = HTResponse_redirection(response);     /* Check for destination */    if (!new_anchor) {	HTTRACE(PROT_TRACE, "Redirection. No destination\n");	return HT_OK;    }    /*    ** Only do automatic redirect on GET and HEAD. Ask for all    ** other methods.    */    if (!HTMethod_isSafe(method)) {	/*	** If we got a 303 See Other then change the method to GET.	** Otherwise ask the user whether we should continue.	*/	if (status == HT_SEE_OTHER) {	    HTTRACE(PROT_TRACE, "Redirection. Changing method from %s to GET\n" _ 			HTMethod_name(method));	    HTRequest_setMethod(request, METHOD_GET);	} else {	    HTAlertCallback * prompt = HTAlert_find(HT_A_CONFIRM);	    if (prompt) {		if ((*prompt)(request, HT_A_CONFIRM, HT_MSG_REDIRECTION,			      NULL, NULL, NULL) != YES)		    return HT_OK;	    }	}    }     /* Register the redirection as a link relationship */    {	HTLinkType ltype = status==HT_PERM_REDIRECT ? HT_LR_PERM_REDIRECT :	    (status==HT_TEMP_REDIRECT || status==HT_FOUND) ? HT_LR_TEMP_REDIRECT :	    status==HT_SEE_OTHER ? HT_LR_SEE_OTHER : NULL;	if (ltype) {	    HTLink_add((HTAnchor *) HTRequest_anchor(request), new_anchor, 		       ltype, method);	}    }    /* Delete any auth credendials as they get regenerated */    HTRequest_deleteCredentialsAll(request);    /*    **  Start new request with the redirect anchor found in the headers.    **	Note that we reuse the same request object which means that we must    **  keep this around until the redirected request has terminated. It also    **  allows us in an easy way to keep track of the number of redirections    **	so that we can detect endless loops.    */     if (HTRequest_doRetry(request)) { 	HTLoadAnchor(new_anchor, request);    } else {	HTRequest_addError(request, ERR_FATAL, NO, HTERR_MAX_REDIRECT,			   NULL, 0, "HTRedirectFilter");	return HT_OK;		/* Wanna fall through */    }    /*    **  By returning HT_ERROR we make sure that this is the last handler to be    **  called. We do this as we don't want any other filter to delete the     **  request object now when we have just started a new one ourselves    */    return HT_ERROR;} /***	Retry through Proxy AFTER Filter**	--------------------------------**	This filter handles a 305 Use Proxy response and retries the request**	through the proxy*/PUBLIC int HTUseProxyFilter (HTRequest * request, HTResponse * response,			     void * param, int status){    HTAlertCallback * cbf = HTAlert_find(HT_A_CONFIRM);    HTAnchor * proxy_anchor = HTResponse_redirection(response);     if (!proxy_anchor) {	HTTRACE(PROT_TRACE, "Use Proxy... No proxy location\n");	return HT_OK;    }    /*    **  Add the proxy to the list. Assume HTTP access method only!    **  Because evil servers may rediret the client to an untrusted    **  proxy, we can only accept redirects for this particular    **  server. Also, we do not know whether this is for HTTP or all    **  other requests as well    */    if ((cbf && (*cbf)(request, HT_A_CONFIRM, HT_MSG_PROXY, NULL,NULL,NULL))) {	char * addr = HTAnchor_address(proxy_anchor);	HTProxy_add("http", addr);	HT_FREE(addr); 	/*	**  Start new request through the proxy if we haven't reached the max	**  number of redirections for this request	*/ 	if (HTRequest_doRetry(request)) { 	    HTLoadAnchor(proxy_anchor, request);	} else {	    HTRequest_addError(request, ERR_FATAL, NO, HTERR_MAX_REDIRECT,			       NULL, 0, "HTRedirectFilter");	}	/*	**  By returning HT_ERROR we make sure that this is the last handler to be	**  called. We do this as we don't want any other filter to delete the 	**  request object now when we have just started a new one ourselves	*/	return HT_ERROR;    } else {	HTRequest_addError(request, ERR_FATAL, NO, HTERR_NO_AUTO_PROXY,			   NULL, 0, "HTUseProxyFilter");	return HT_OK;    }} /***	Client side authentication BEFORE filter**	----------------------------------------**	The filter generates the credentials required to access a document**	Getting the credentials may involve asking the user*/PUBLIC int HTCredentialsFilter (HTRequest * request, void * param, int mode){    /*    ** Ask the authentication module to call the right credentials generator    ** that understands this scheme    */    if (HTAA_beforeFilter(request, param, mode) == HT_OK) {	HTTRACE(PROT_TRACE, "Credentials. verified\n");	return HT_OK;    } else {	HTRequest_addError(request, ERR_FATAL, NO, HTERR_UNAUTHORIZED,			   NULL, 0, "HTCredentialsFilter");	return HT_ERROR;    }}/***	Client side authentication AFTER filter**	---------------------------------------**	The client side authentication filter uses the **	user dialog messages registered in the HTAlert module.**	By default these are the ones used by the line mode browser but you can**	just register something else.*/PUBLIC int HTAuthFilter (HTRequest * request, HTResponse * response,			 void * param, int status){    /*    ** Ask the authentication module to call the right challenge parser    ** that understands this scheme    */    if (HTAA_afterFilter(request, response, param, status) == HT_OK) {	/*	** Start request with new credentials. As with the redirection filter	** we reuse the same request object which means that we must	** keep this around until the redirected request has terminated	*/	HTLoad(request, NO);	/*	**  We return HT_ERROR to make sure that this is the last handler to be	**  called. We do this as we don't want any other filter to delete the 	**  request object now when we have just started a new one ourselves	*/	return HT_ERROR;    }    return HT_OK;}/***	Client side authentication info AFTER filter**	---------------------------------------*/PUBLIC int HTAuthInfoFilter (HTRequest * request, HTResponse * response,			     void * param, int status){    /*    ** Ask the authentication module to call the right authentication info    ** parser    */    if (! HTResponse_challenge (response))      return HT_OK;    else if (HTAA_updateFilter(request, response, param, status) == HT_OK)       return HT_OK;    else      return HT_ERROR;}/***	Request Logging AFTER filter**	----------------------------**	Default Logging filter using the log manager provided by HTLog.c*/PUBLIC int HTLogFilter (HTRequest * request, HTResponse * response,			void * param, int status){    if (request) {	HTLog * log = (HTLog *) param;	if (log) HTLog_addCLF(log, request, status);	return HT_OK;    }    return HT_ERROR;}/***	Request Referer AFTER filter**	----------------------------**	Default Referer Log filter using the log manager provided by HTLog.c*/PUBLIC int HTRefererFilter (HTRequest * request, HTResponse * response,			    void * param, int status){    if (request) {	HTLog * log = (HTLog *) param;	if (log) HTLog_addReferer(log, request, status);	return HT_OK;    }    return HT_ERROR;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩和欧美的一区| 91精品国产91热久久久做人人| 精品免费国产二区三区 | 欧美日韩视频专区在线播放| 中文字幕一区二区三区不卡| 不卡大黄网站免费看| 中文字幕一区二区三区四区不卡 | 99精品国产99久久久久久白柏| 国产亚洲欧美日韩日本| 国产成人aaaa| 亚洲人成影院在线观看| 欧美在线999| 首页欧美精品中文字幕| 欧美一区二区在线免费观看| 久久99精品国产麻豆婷婷| 精品日韩av一区二区| 国产高清不卡一区| 一区二区在线观看视频在线观看| 欧美日韩视频不卡| 国产一区二区三区综合| 国产精品国产自产拍在线| 欧美色国产精品| 精品一区二区成人精品| 国产精品女同一区二区三区| 欧美三级中文字幕| 精品一区二区三区在线观看| 中文字幕乱码亚洲精品一区| 欧美三级视频在线观看| 精品一区二区影视| 亚洲精品水蜜桃| 欧美一激情一区二区三区| 成人免费高清视频| 水蜜桃久久夜色精品一区的特点| 国产欧美一区二区精品秋霞影院| 91福利精品第一导航| 国产一区美女在线| 亚洲午夜久久久久久久久电影院| 精品福利在线导航| **网站欧美大片在线观看| 欧美三级三级三级爽爽爽| 国产一区二三区| 一区二区成人在线| 久久久久久久久一| 欧美理论电影在线| 不卡av免费在线观看| 麻豆精品一区二区| 亚洲午夜久久久| 国产精品欧美经典| 精品粉嫩aⅴ一区二区三区四区| 91激情五月电影| 丁香亚洲综合激情啪啪综合| 日本va欧美va欧美va精品| 亚洲视频在线一区观看| 2021久久国产精品不只是精品| 欧美日韩日日夜夜| 一本一本久久a久久精品综合麻豆 一本一道波多野结衣一区二区 | 国产成人综合视频| 久久国产综合精品| 国产精品久久二区二区| 亚洲一区二区精品视频| 亚洲欧美日韩久久| 色综合色狠狠天天综合色| 亚洲国产精品黑人久久久| 国产自产v一区二区三区c| 欧美xxxxxxxxx| 国产suv精品一区二区6| 一区二区三区高清| 精品国产一区二区三区不卡 | 精品久久久久久久久久久院品网| 国产成人免费高清| 99精品欧美一区二区蜜桃免费| 首页综合国产亚洲丝袜| 亚洲乱码一区二区三区在线观看| 日韩免费成人网| 91精品国产91久久久久久一区二区| 97se亚洲国产综合自在线| 激情六月婷婷久久| 奇米888四色在线精品| 欧美在线免费播放| 久久99久久久欧美国产| 久久99精品国产麻豆婷婷| 国内精品在线播放| 国产成人av一区二区三区在线| av一区二区三区在线| 色偷偷一区二区三区| 色噜噜夜夜夜综合网| 欧美亚洲图片小说| 日韩免费电影一区| xfplay精品久久| 亚洲国产成人一区二区三区| 国产综合色视频| 日韩亚洲欧美在线| 精品久久久久久亚洲综合网 | 日韩精品一二区| 国产自产视频一区二区三区| 国产精品一卡二卡在线观看| 在线亚洲精品福利网址导航| 91精品久久久久久久99蜜桃| 亚洲成人中文在线| 亚洲少妇30p| 欧美日韩国产高清一区二区| 91丨九色丨国产丨porny| 欧美一区中文字幕| 日韩理论在线观看| 精品一区免费av| 在线观看国产日韩| 国产精品五月天| 蜜臀精品一区二区三区在线观看 | 免费高清在线一区| 色综合久久综合中文综合网| 精品欧美一区二区久久| 亚洲福利一区二区三区| av影院午夜一区| 久久女同精品一区二区| 日本强好片久久久久久aaa| 色屁屁一区二区| 中文字幕亚洲欧美在线不卡| 久久不见久久见免费视频7 | 国产欧美精品国产国产专区| 日韩精品电影在线观看| 在线观看日韩高清av| 亚洲视频狠狠干| 成人av资源在线观看| 欧美成人a视频| 欧美a级理论片| 欧美日韩精品一区二区在线播放| 亚洲精品菠萝久久久久久久| 久久人人97超碰com| 日韩精品一级中文字幕精品视频免费观看 | 欧美日韩精品一区视频| 亚洲蜜臀av乱码久久精品| 国产成人免费视| 久久婷婷色综合| 精油按摩中文字幕久久| 欧美日韩中文字幕一区二区| 亚洲国产美女搞黄色| 欧美无砖专区一中文字| 亚洲网友自拍偷拍| 欧美久久久久久久久中文字幕| 亚洲成人激情社区| 91精品国产综合久久婷婷香蕉| 亚洲国产裸拍裸体视频在线观看乱了| 一本久道久久综合中文字幕| 亚洲欧美日韩电影| 在线免费亚洲电影| 亚洲图片有声小说| 日韩一区二区中文字幕| 久久国产精品免费| 久久奇米777| 成人av电影在线播放| 亚洲婷婷国产精品电影人久久| 91色婷婷久久久久合中文| 亚洲狠狠丁香婷婷综合久久久| 欧美日免费三级在线| 日韩和欧美一区二区| 欧美成人精品二区三区99精品| 韩国三级电影一区二区| 中文一区在线播放| 一本色道亚洲精品aⅴ| 亚洲电影一区二区三区| 欧美狂野另类xxxxoooo| 奇米精品一区二区三区在线观看一| 午夜欧美在线一二页| 91美女片黄在线观看91美女| 日韩亚洲欧美高清| 国产日产亚洲精品系列| 亚洲午夜久久久久久久久久久| 亚洲欧洲日本在线| 亚洲成人综合在线| 成人妖精视频yjsp地址| 成人avav在线| 色综合天天综合| 8v天堂国产在线一区二区| 欧美国产精品劲爆| 亚洲一区二区三区四区中文字幕| 亚洲夂夂婷婷色拍ww47| 美女尤物国产一区| 蜜臀av一区二区| 高清日韩电视剧大全免费| 欧美日韩视频在线观看一区二区三区 | 春色校园综合激情亚洲| 欧美日韩精品高清| 亚洲bt欧美bt精品777| 国产一区二区三区在线看麻豆| 欧美日韩一区小说| 中文字幕在线不卡| 成人免费毛片aaaaa**| 精品国精品国产| 亚洲成a人片在线观看中文| 色天天综合久久久久综合片| 日韩理论片中文av| 欧美日韩1区2区| 高清不卡一区二区在线| 国产精品日韩成人| 色婷婷国产精品| 久久99国内精品| 成人免费在线视频观看| 99久久国产综合色|国产精品| 精品一区二区三区影院在线午夜| 91麻豆成人久久精品二区三区|