📄 lib_4.0c_1.fix
字号:
diff -c Library/Repository/Implementation/HTAABrow.c:2.28.4.1 Library/Repository/Implementation/HTAABrow.c:2.28*** Library/Repository/Implementation/HTAABrow.c:2.28.4.1 Tue Jan 23 16:31:15 1996--- Library/Repository/Implementation/HTAABrow.c Tue Jan 23 16:31:15 1996****************** 768,810 **** return (HTPasswordDialog(req)); } - /*- ** Setup HTTP access authentication- */- PUBLIC BOOL HTAA_authentication (HTRequest * request)- {- HTAAScheme scheme;- HTList *valid_schemes = HTList_new();- HTAssocList **scheme_specifics = NULL;- char *tmplate = NULL;- - if (request->WWWAAScheme) {- if ((scheme = HTAAScheme_enum(request->WWWAAScheme)) != HTAA_UNKNOWN) {- HTList_addObject(valid_schemes, (void *) scheme);- if (!scheme_specifics) {- int i;- scheme_specifics = (HTAssocList**)- malloc(HTAA_MAX_SCHEMES * sizeof(HTAssocList*));- if (!scheme_specifics)- outofmem(__FILE__, "HTTPAuthentication");- for (i=0; i < HTAA_MAX_SCHEMES; i++)- scheme_specifics[i] = NULL;- }- scheme_specifics[scheme] = HTAA_parseArgList(request->WWWAARealm);- } else if (PROT_TRACE) {- HTRequest_addError(request, ERR_INFO, NO, HTERR_UNKNOWN_AA,- (void *) request->WWWAAScheme, 0, "HTTPAuthentication");- return NO;- }- }- if (request->WWWprotection) {- if (PROT_TRACE)- TTYPrint(TDEST, "Protection template set to `%s'\n",- request->WWWprotection);- StrAllocCopy(tmplate, request->WWWprotection);- }- request->valid_schemes = valid_schemes;- request->scheme_specifics = scheme_specifics;- request->prot_template = tmplate;- return YES;- }--- 768,770 ----diff -c Library/Repository/Implementation/HTAABrow.html:2.20.4.1 Library/Repository/Implementation/HTAABrow.html:2.20*** Library/Repository/Implementation/HTAABrow.html:2.20.4.1 Tue Jan 23 16:31:16 1996--- Library/Repository/Implementation/HTAABrow.html Tue Jan 23 16:31:16 1996****************** 1,6 **** <HEAD> <TITLE>Browser side Access Auth</TITLE>! <!-- Changed by: Henrik Frystyk Nielsen, 20-Jan-1996 --> </HEAD> <BODY> --- 1,6 ---- <HEAD> <TITLE>Browser side Access Auth</TITLE>! <!-- Changed by: Henrik Frystyk Nielsen, 19-Nov-1995 --> </HEAD> <BODY> ****************** 186,197 **** extern void HTAAForwardAuth_set (CONST char * scheme_name, CONST char * scheme_specifics); extern void HTAAForwardAuth_reset (void);- </PRE>- - <H2>Setup HTTP access authentication</H2>- - <PRE>- extern BOOL HTAA_authentication (HTRequest * request); </PRE> <PRE>--- 186,191 ----diff -c Library/Repository/Implementation/HTAccess.c:1.108.2.1 Library/Repository/Implementation/HTAccess.c:1.108*** Library/Repository/Implementation/HTAccess.c:1.108.2.1 Tue Jan 23 16:31:17 1996--- Library/Repository/Implementation/HTAccess.c Tue Jan 23 16:31:17 1996****************** 423,443 **** ** to NNTP and puts into the "newsgroups" header ** Returns YES if request accepted, else NO */! PUBLIC BOOL HTCopyAnchor (HTAnchor * src_anchor, HTRequest * main_dest) { HTRequest * src_req; HTList * cur;! if (!src_anchor || !main_dest) {! if (WWWTRACE) TTYPrint(TDEST, "Copy........ BAD ARGUMENT\n"); return NO;- } /* Build the POST web if not already there */! if (!main_dest->source) {! src_req = HTRequest_dupInternal(main_dest); /* Get a duplicate */ HTAnchor_clearHeader((HTParentAnchor *) src_anchor);- src_req->method = METHOD_GET; src_req->reload = HT_MEM_REFRESH; src_req->output_stream = NULL; src_req->output_format = WWW_SOURCE; /* We want source (for now) */ --- 423,441 ---- ** to NNTP and puts into the "newsgroups" header ** Returns YES if request accepted, else NO */! PUBLIC BOOL HTCopyAnchor (HTAnchor * src_anchor, HTRequest * main_req) { HTRequest * src_req; HTList * cur;! if (!src_anchor || !main_req) return NO; /* Build the POST web if not already there */! if (!main_req->source) {! src_req = HTRequest_dup(main_req); /* First set up the source */ HTAnchor_clearHeader((HTParentAnchor *) src_anchor); src_req->reload = HT_MEM_REFRESH;+ src_req->source = src_req; /* Point to myself */ src_req->output_stream = NULL; src_req->output_format = WWW_SOURCE; /* We want source (for now) */ ****************** 448,470 **** HTMethod method = HTLink_method(main_link); if (!main_link || method==METHOD_INVALID) { if (WWWTRACE)! TTYPrint(TDEST, "Copy Anchor. No destination found or unspecified method\n"); HTRequest_delete(src_req); return NO; }! main_dest->GenMask |= HT_G_DATE; /* Send date header */! main_dest->reload = HT_CACHE_REFRESH;! main_dest->method = method;! main_dest->input_format = WWW_SOURCE;! HTRequest_addDestination(src_req, main_dest);! if (HTLoadAnchor(main_anchor, main_dest) == NO)! return NO; } /* For all other links in the source anchor */ if ((cur = HTAnchor_subLinks(src_anchor))) { HTLink * pres;! while ((pres = (HTLink *) HTList_nextObject(cur))) { HTAnchor *dest = HTLink_destination(pres); HTMethod method = HTLink_method(pres); HTRequest *dest_req;--- 446,472 ---- HTMethod method = HTLink_method(main_link); if (!main_link || method==METHOD_INVALID) { if (WWWTRACE)! TTYPrint(TDEST, "Copy Anchor. No destination found or unspecified method"); HTRequest_delete(src_req); return NO; }! if (HTLink_result(main_link) == HT_LINK_NONE) {! main_req->GenMask |= HT_G_DATE; /* Send date header */! main_req->source = src_req;! main_req->reload = HT_CACHE_REFRESH;! main_req->method = method;! HTRequest_addDestination(src_req, main_req);! main_req->input_format = WWW_SOURCE;! if (HTLoadAnchor(main_anchor, main_req) == NO)! return NO;! } } /* For all other links in the source anchor */ if ((cur = HTAnchor_subLinks(src_anchor))) { HTLink * pres;! while ((pres = (HTLink *) HTList_nextObject(cur)) &&! HTLink_result(pres) == HT_LINK_NONE) { HTAnchor *dest = HTLink_destination(pres); HTMethod method = HTLink_method(pres); HTRequest *dest_req;****************** 474,495 **** dest); return NO; }! dest_req = HTRequest_dupInternal(main_dest); dest_req->GenMask |= HT_G_DATE; /* Send date header */ dest_req->reload = HT_CACHE_REFRESH; dest_req->method = method; dest_req->output_stream = NULL; dest_req->output_format = WWW_SOURCE;- HTRequest_addDestination(src_req, dest_req); if (HTLoadAnchor(dest, dest_req) == NO) return NO; } } } else { /* Use the existing Post Web and restart it */! src_req = main_dest->source; if (src_req->mainDestination)! if (HTLoadDocument(main_dest, NO) == NO) return NO; if (src_req->destinations) { HTRequest * pres;--- 476,499 ---- dest); return NO; }! dest_req = HTRequest_dup(main_req); dest_req->GenMask |= HT_G_DATE; /* Send date header */+ dest_req->source = src_req; dest_req->reload = HT_CACHE_REFRESH; dest_req->method = method;+ HTRequest_addDestination(src_req, dest_req);+ dest_req->output_stream = NULL; dest_req->output_format = WWW_SOURCE; if (HTLoadAnchor(dest, dest_req) == NO) return NO; } } } else { /* Use the existing Post Web and restart it */! src_req = main_req->source; if (src_req->mainDestination)! if (HTLoadDocument(main_req, NO) == NO) return NO; if (src_req->destinations) { HTRequest * pres;****************** 519,528 **** HTRequest * dest_req) { HTMethod allowed = HTAnchor_methods(dest_anchor);! if (!src_anchor || !dest_anchor || !dest_req) {! if (WWWTRACE) TTYPrint(TDEST, "Upload...... BAD ARGUMENT\n"); return NO;- } if (!(allowed & dest_req->method)) { BOOL confirm = NO; HTAlertCallback *cbf = HTAlert_find(HT_A_CONFIRM);--- 523,530 ---- HTRequest * dest_req) { HTMethod allowed = HTAnchor_methods(dest_anchor);! if (!src_anchor || !dest_anchor || !dest_req) return NO; if (!(allowed & dest_req->method)) { BOOL confirm = NO; HTAlertCallback *cbf = HTAlert_find(HT_A_CONFIRM);diff -c Library/Repository/Implementation/HTConLen.c:2.4.4.1 Library/Repository/Implementation/HTConLen.c:2.4*** Library/Repository/Implementation/HTConLen.c:2.4.4.1 Tue Jan 23 16:31:18 1996--- Library/Repository/Implementation/HTConLen.c Tue Jan 23 16:31:18 1996****************** 125,131 **** me->head = cur->next; free_buf(cur); }- me->give_up = YES; return HT_OK; } --- 125,130 ----****************** 187,201 **** PRIVATE int buf_abort (HTStream * me, HTList * e) {- HTBufItem * cur; if (!me->give_up) free_buf_all(me); if (me->target) (*me->target->isa->abort)(me->target,e);- while ((cur = me->head)) {- me->head = cur->next;- free_buf(cur);- } free(me); if (PROT_TRACE) TTYPrint(TDEST, "Length...... ABORTING...\n"); return HT_ERROR;--- 186,195 ----diff -c Library/Repository/Implementation/HTDialog.c:2.3.2.1 Library/Repository/Implementation/HTDialog.c:2.3*** Library/Repository/Implementation/HTDialog.c:2.3.2.1 Tue Jan 23 16:31:19 1996--- Library/Repository/Implementation/HTDialog.c Tue Jan 23 16:31:20 1996****************** 136,153 **** break; case HT_PROG_WRITE:! if (HTRequest_isPostWeb(request)) {! HTParentAnchor *anchor=HTRequest_anchor(HTRequest_source(request));! long cl = HTAnchor_length(anchor);! if (cl > 0) {! long b_write = HTRequest_bytesWritten(request);! double pro = (double) b_write/cl*100;! char buf[10];! HTNumToStr((unsigned long) cl, buf, 10);! TTYPrint(TDEST, "Written (%d%% of %s)\n", (int) pro, buf);! } else! TTYPrint(TDEST, "Writing...\n");! } break; case HT_PROG_DONE:--- 136,142 ---- break; case HT_PROG_WRITE:! TTYPrint(TDEST, "Writing...\n"); break; case HT_PROG_DONE:diff -c Library/Repository/Implementation/HTEvntrg.c:2.24.2.1 Library/Repository/Implementation/HTEvntrg.c:2.24*** Library/Repository/Implementation/HTEvntrg.c:2.24.2.1 Tue Jan 23 16:31:20 1996--- Library/Repository/Implementation/HTEvntrg.c Tue Jan 23 16:31:20 1996****************** 431,437 **** TTYPrint(TDEST, "Req Update.. updating for socket %u\n", s) ; rqp->unregister = (ops & FD_UNREGISTER) ? YES : NO; rqp->actions[0].rq = rq ;! rqp->actions[0].ops |= ops ; rqp->actions[0].cbf = cbf ; rqp->actions[0].p = p ; return;--- 431,437 ---- TTYPrint(TDEST, "Req Update.. updating for socket %u\n", s) ; rqp->unregister = (ops & FD_UNREGISTER) ? YES : NO; rqp->actions[0].rq = rq ;! rqp->actions[0].ops = ops ; rqp->actions[0].cbf = cbf ; rqp->actions[0].p = p ; return;****************** 459,466 **** } if (THD_TRACE)! TTYPrint(TDEST, "UnRegister.. %s entry for socket %d with ops %x\n",! (found) ? "Found" : "Didn't find", s, (unsigned) ops); if (! found) return 0; --- 459,466 ---- } if (THD_TRACE)! TTYPrint(TDEST, "UnRegister.. %s entry for socket %d\n",! (found) ? "Found" : "Didn't find", s); if (! found) return 0; ****************** 844,853 **** HTRequest * rqp = NULL; HTEventCallback *cbf = HTEvent_Retrieve( s, ops, &rqp); /* although it makes no sense, callbacks can be null */! if (!cbf || !rqp || rqp->priority == HT_PRIORITY_OFF) {! if (THD_TRACE) TTYPrint(TDEST, "Callback.... No callback found\n"); return (0);- } return (*cbf)(s, rqp, ops); } --- 844,851 ---- HTRequest * rqp = NULL; HTEventCallback *cbf = HTEvent_Retrieve( s, ops, &rqp); /* although it makes no sense, callbacks can be null */! if (!cbf || rqp->priority == HT_PRIORITY_OFF) return (0); return (*cbf)(s, rqp, ops); } ****************** 860,869 **** HTRequest * rqp = NULL; HTEventCallback *cbf = HTEvent_Retrieve( s, ops, &rqp); /* although it makes no sense, callbacks can be null*/! if (!cbf || !rqp || rqp->priority == HT_PRIORITY_OFF) {! if (THD_TRACE) TTYPrint(TDEST, "UserCallback No callback found\n"); return (0);- } return (*cbf)(s, rqp, ops); } --- 858,865 ---- HTRequest * rqp = NULL; HTEventCallback *cbf = HTEvent_Retrieve( s, ops, &rqp); /* although it makes no sense, callbacks can be null*/! if (!cbf || rqp->priority == HT_PRIORITY_OFF) return (0); return (*cbf)(s, rqp, ops); } ****************** 966,972 **** s = all_fds.fd_array[ui] ; #else for (s = 0 ; s <= max_sock; s++) { ! if (FD_ISSET(s, fdp)) #endif { TTYPrint(TDEST, "%4d\n", s);--- 962,968 ---- s = all_fds.fd_array[ui] ; #else for (s = 0 ; s <= max_sock; s++) { ! if (FD_ISSET(s, &all_fds)) #endif { TTYPrint(TDEST, "%4d\n", s);diff -c Library/Repository/Implementation/HTFile.c:1.106.2.1 Library/Repository/Implementation/HTFile.c:1.106*** Library/Repository/Implementation/HTFile.c:1.106.2.1 Tue Jan 23 16:31:21 1996--- Library/Repository/Implementation/HTFile.c Tue Jan 23 16:31:21 1996****************** 119,125 **** ** Reads the directory "path" ** Returns: ** HT_ERROR Error
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -