⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lib_4.0c_1.fix

📁 www工具包
💻 FIX
📖 第 1 页 / 共 5 页
字号:
! **		HT_FORBIDDEN	Directory reading not allowed  **		HT_LOADED	Successfully read the directory  */  PRIVATE int HTFile_readDir (HTRequest * request, file_info *file)--- 119,125 ----  **	Reads the directory "path"  **	Returns:  **		HT_ERROR	Error! **		HT_NO_ACCESS	Directory reading not allowed  **		HT_LOADED	Successfully read the directory  */  PRIVATE int HTFile_readDir (HTRequest * request, file_info *file)****************** 136,142 ****      if (dir_access == HT_DIR_FORBID) {  	HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,  		   NULL, 0, "HTFile_readDir");! 	return HT_FORBIDDEN;      }            /* Initialize path name for stat() */--- 136,142 ----      if (dir_access == HT_DIR_FORBID) {  	HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,  		   NULL, 0, "HTFile_readDir");! 	return HT_NO_ACCESS;      }            /* Initialize path name for stat() */****************** 160,166 ****  			"Read dir.... `%s\' not found\n", DEFAULT_DIR_FILE);  	    HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,  		       NULL, 0, "HTFile_readDir");! 	    return HT_FORBIDDEN;  	}      }  --- 160,166 ----  			"Read dir.... `%s\' not found\n", DEFAULT_DIR_FILE);  	    HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,  		       NULL, 0, "HTFile_readDir");! 	    return HT_NO_ACCESS;  	}      }  ****************** 363,371 ****      file_info *file = (file_info *) net->context;        /* Free stream with data TO Local file system */!     if (HTRequest_isDestination(req))! 	HTRequest_removeDestination(req);!     else  if (req->input_stream) {  	if (status == HT_INTERRUPTED)  	    (*req->input_stream->isa->abort)(req->input_stream, NULL);  	else--- 363,369 ----      file_info *file = (file_info *) net->context;        /* Free stream with data TO Local file system */!     if (!HTRequest_isDestination(req) && req->input_stream) {  	if (status == HT_INTERRUPTED)  	    (*req->input_stream->isa->abort)(req->input_stream, NULL);  	else****************** 384,390 ****  	FREE(file->local);  	free(file);      }!     HTNet_delete(net, req->internal ? HT_IGNORE : status);      return YES;  }  --- 382,388 ----  	FREE(file->local);  	free(file);      }!     HTNet_delete(net, status);      return YES;  }  ****************** 418,426 ****  	file->state = FS_BEGIN;  	net->context = file;      } if (ops == FD_CLOSE) {				      /* Interrupted */! 	HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED,! 			   NULL, 0, "HTLoadHTTP");! 	FileCleanup(request, HT_INTERRUPTED);  	return HT_OK;      } else  	file = (file_info *) net->context;		/* Get existing copy */--- 416,425 ----  	file->state = FS_BEGIN;  	net->context = file;      } if (ops == FD_CLOSE) {				      /* Interrupted */! 	if(HTRequest_isPostWeb(request)&&!HTRequest_isMainDestination(request))! 	    FileCleanup(request, HT_IGNORE);! 	else! 	    FileCleanup(request, HT_INTERRUPTED);  	return HT_OK;      } else  	file = (file_info *) net->context;		/* Get existing copy */****************** 560,565 ****--- 559,573 ----  		TTYPrint(TDEST,"HTLoadFile.. `%s' opened using FILE %p\n",  			file->local, file->fp);  #endif /* !NO_UNIX_IO */+ 	    file->state = FS_NEED_TARGET;+ 	    break;+ + 	  case FS_NEED_TARGET:+ 	    /*+ 	    ** We need to wait for the destinations to get ready+ 	    */+ 	    if (HTRequest_isSource(request) && !request->output_stream)+ 		return HT_OK;    	    /* Set up stream TO local file system */  	    request->input_stream = HTBufWriter_new(net, YES, 512);****************** 570,586 ****  	    ** before all destinations are ready. If destination then  	    ** register the input stream and get ready for read  	    */! 	    if (HTRequest_isDestination(request)) {  		HTEvent_Register(net->sockfd, request, (SockOps) FD_READ,  				 HTLoadFile, net->priority);  		HTRequest_linkDestination(request);  	    }- 	    file->state = FS_NEED_TARGET;- 	    if (HTRequest_isSource(request) && !HTRequest_destinationsReady(request))- 		return HT_OK;- 	    break;  - 	  case FS_NEED_TARGET:  	    /*  	    ** Set up read buffer and streams.  	    ** If cache element, we know that it's MIME, so call MIME parser--- 578,589 ----  	    ** before all destinations are ready. If destination then  	    ** register the input stream and get ready for read  	    */! 	    if (HTRequest_isPostWeb(request)) {  		HTEvent_Register(net->sockfd, request, (SockOps) FD_READ,  				 HTLoadFile, net->priority);  		HTRequest_linkDestination(request);  	    }    	    /*  	    ** Set up read buffer and streams.  	    ** If cache element, we know that it's MIME, so call MIME parser****************** 636,690 ****    	  case FS_GOT_DATA:  	    if (HTRequest_isPostWeb(request)) {  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_OK);  		}! 	    }! 	    FileCleanup(request, HT_LOADED);  	    return HT_OK;  	    break;    	  case FS_NO_DATA:  	    if (HTRequest_isPostWeb(request)) {  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_OK);  		}! 	    }! 	    FileCleanup(request, HT_NO_DATA);  	    return HT_OK;  	    break;    	  case FS_RETRY:  	    if (HTRequest_isPostWeb(request)) {  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_ERROR);  		}! 		HTRequest_killPostWeb(request);! 	    }! 	    FileCleanup(request, HT_RETRY);  	    return HT_OK;  	    break;    	  case FS_ERROR:  	    if (HTRequest_isPostWeb(request)) {  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_ERROR);  		}! 		HTRequest_killPostWeb(request);! 	    }! 	    FileCleanup(request, HT_ERROR);  	    return HT_OK;  	    break;  	}--- 639,706 ----    	  case FS_GOT_DATA:  	    if (HTRequest_isPostWeb(request)) {+ 		FileCleanup(request, HTRequest_isMainDestination(request) ?+ 			    HT_LOADED : HT_IGNORE);  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_OK);  		}! 		HTRequest_removeDestination(request);! 	    } else! 		FileCleanup(request, HT_LOADED);  	    return HT_OK;  	    break;    	  case FS_NO_DATA:  	    if (HTRequest_isPostWeb(request)) {+ 		FileCleanup(request, HTRequest_isMainDestination(request) ?+ 			    HT_NO_DATA : HT_IGNORE);  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_OK);  		}! 		HTRequest_removeDestination(request);! 	    } else! 		FileCleanup(request, HT_NO_DATA);  	    return HT_OK;  	    break;    	  case FS_RETRY:  	    if (HTRequest_isPostWeb(request)) {+ 		FileCleanup(request, HTRequest_isMainDestination(request) ?+ 			    HT_RETRY : HT_IGNORE);+ 		HTRequest_killPostWeb(request);  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_ERROR);  		}! 		HTRequest_removeDestination(request);! 	    } else! 		FileCleanup(request, HT_RETRY);  	    return HT_OK;  	    break;    	  case FS_ERROR:+ 	    /* Clean up the other connections or just this one */  	    if (HTRequest_isPostWeb(request)) {+ 		FileCleanup(request, HTRequest_isMainDestination(request) ?+ 			    HT_ERROR : HT_IGNORE);+ 		HTRequest_killPostWeb(request);  		if (HTRequest_isDestination(request)) {  		    HTLink *link =  			HTAnchor_findLink((HTAnchor *) request->source->anchor,  					  (HTAnchor *) anchor);  		    HTLink_setResult(link, HT_LINK_ERROR);  		}! 		HTRequest_removeDestination(request);! 	    } else! 		FileCleanup(request, HT_ERROR);  	    return HT_OK;  	    break;  	}diff -c Library/Repository/Implementation/HTInit.html:2.28.2.1 Library/Repository/Implementation/HTInit.html:2.28*** Library/Repository/Implementation/HTInit.html:2.28.2.1	Tue Jan 23 16:31:22 1996--- Library/Repository/Implementation/HTInit.html	Tue Jan 23 16:31:22 1996****************** 1,7 ****  <HTML>  <HEAD>  <TITLE>Initialization Routines</TITLE>! <!-- Changed by: Henrik Frystyk Nielsen, 22-Jan-1996 -->  </HEAD>  <BODY>  <H1>Initialization Module</H1>--- 1,7 ----  <HTML>  <HEAD>  <TITLE>Initialization Routines</TITLE>! <!-- Changed by: Henrik Frystyk Nielsen,  8-Dec-1995 -->  </HEAD>  <BODY>  <H1>Initialization Module</H1>****************** 36,42 ****    <IMG SRC="../../Icons/32x32/warning.gif"> <B>PLEASE SEE THE <A  HREF="HTBInit.html">HTBInit MODULE</A> FOR STANDARD BINDINGS BETWEEN! FILE EXTENSIONS AND MEDIA TYPES.</B>    <PRE>  #ifndef HTINIT_H--- 36,42 ----    <IMG SRC="../../Icons/32x32/warning.gif"> <B>PLEASE SEE THE <A  HREF="HTBInit.html">HTBInit MODULE</A> FOR STANDARD BINDINGS BETWEEN! FILE EXTENSIONS AND MEDIA TYPES.    <PRE>  #ifndef HTINIT_H****************** 95,101 ****    <PRE>  #include "HTIcons.h"! #include "WWWHTTP.h"  #include "HTFile.h"  #include "HTFTP.h"  #include "HTGopher.h"--- 95,101 ----    <PRE>  #include "HTIcons.h"! #include "HTTP.h"  #include "HTFile.h"  #include "HTFTP.h"  #include "HTGopher.h"diff -c Library/Repository/Implementation/HTMIME.c:2.45.2.1 Library/Repository/Implementation/HTMIME.c:2.45*** Library/Repository/Implementation/HTMIME.c:2.45.2.1	Tue Jan 23 16:31:23 1996--- Library/Repository/Implementation/HTMIME.c	Tue Jan 23 16:31:23 1996****************** 499,505 ****  	    break;    	  case LOCATION:! 	    request->redirectionAnchor = HTAnchor_findAddress(HTStrip(ptr));  	    state = JUNK_LINE;  	    break;  --- 499,513 ----  	    break;    	  case LOCATION:! #if 0! 	    /*! 	    ** Doesn't work as a redirection header might contain a '='! 	    ** Thanks to mitch@tam.net (Mitch DeShields)! 	    */! 	    if ((value = HTNextField(&ptr)) != NULL)! 		StrAllocCopy(request->redirect, value);! #endif! 	    StrAllocCopy(request->redirect, ptr);  	    state = JUNK_LINE;  	    break;  ****************** 586,592 ****  	if (me->EOLstate == EOL_FCR) {  	    if (*b == CR) {				    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		HTNet_setBytesRead(me->net, l);  		if (status != HT_OK)  		    return status;  	    } else if (*b == LF)			   	     /* CRLF */--- 594,600 ----  	if (me->EOLstate == EOL_FCR) {  	    if (*b == CR) {				    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		me->net->bytes_read = l;  		if (status != HT_OK)  		    return status;  	    } else if (*b == LF)			   	     /* CRLF */****************** 604,610 ****  		me->EOLstate = EOL_SCR;  	    else if (*b == LF) {			    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		HTNet_setBytesRead(me->net, l);  		if (status != HT_OK)  		    return status;  	    } else if (WHITE(*b)) {	       /* Folding: LF SP or CR LF SP */--- 612,618 ----  		me->EOLstate = EOL_SCR;  	    else if (*b == LF) {			    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		me->net->bytes_read = l;  		if (status != HT_OK)  		    return status;  	    } else if (WHITE(*b)) {	       /* Folding: LF SP or CR LF SP */****************** 618,624 ****  	} else if (me->EOLstate == EOL_SCR) {  	    if (*b==CR || *b==LF) {			    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		HTNet_setBytesRead(me->net, l);  		if (status != HT_OK)  		    return status;  	    } else if (WHITE(*b)) {	 /* Folding: LF CR SP or CR LF CR SP */--- 626,632 ----  	} else if (me->EOLstate == EOL_SCR) {  	    if (*b==CR || *b==LF) {			    /* End of header */  		int status = parseheader(me, me->request, me->anchor);! 		me->net->bytes_read = l;  		if (status != HT_OK)  		    return status;  	    } else if (WHITE(*b)) {	 /* Folding: LF CR SP or CR LF CR SP */****************** 643,662 ****      ** that we get the correct content length of data      */      if (l > 0) {- 	HTParentAnchor * anchor = me->anchor;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -