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 ****
- extern BOOL HTAA_authentication (HTRequest * request);
--- 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 ! ** 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 ****!Initialization Routines !Initialization Module
--- 1,7 ----Initialization Routines !Initialization Module
*************** *** 36,42 **** PLEASE SEE THE HTBInit MODULE FOR STANDARD BINDINGS BETWEEN ! FILE EXTENSIONS AND MEDIA TYPES.#ifndef HTINIT_H --- 36,42 ---- PLEASE SEE THE HTBInit MODULE FOR STANDARD BINDINGS BETWEEN ! FILE EXTENSIONS AND MEDIA TYPES.!#ifndef HTINIT_H *************** *** 95,101 ****!#include "HTIcons.h" ! #include "WWWHTTP.h" #include "HTFile.h" #include "HTFTP.h" #include "HTGopher.h" --- 95,101 -----#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; if (me->target) { int status = (*me->target->isa->put_block)(me->target, b, l); if (status == HT_OK) /* Check if CL at all - thanks to jwei@hal.com (John Wei) */ return (me->request->method == METHOD_HEAD || ! (anchor->content_length >= 0 && ! HTNet_bytesRead(me->net) >= anchor->content_length)) ? HT_LOADED : HT_OK; else return status; ! } else if (anchor->header_parsed) ! return HT_LOADED; ! else return HT_WOULD_BLOCK; } return HT_OK; --- 651,667 ---- ** that we get the correct content length of data */ if (l > 0) { if (me->target) { int status = (*me->target->isa->put_block)(me->target, b, l); if (status == HT_OK) /* Check if CL at all - thanks to jwei@hal.com (John Wei) */ return (me->request->method == METHOD_HEAD || ! (me->anchor->content_length >= 0 && ! me->net->bytes_read >= me->anchor->content_length)) ? HT_LOADED : HT_OK; else return status; ! } else return HT_WOULD_BLOCK; } return HT_OK; diff -c Library/Repository/Implementation/HTMIMERq.c:2.8.2.1 Library/Repository/Implementation/HTMIMERq.c:2.8 *** Library/Repository/Implementation/HTMIMERq.c:2.8.2.1 Tue Jan 23 16:31:24 1996 --- Library/Repository/Implementation/HTMIMERq.c Tue Jan 23 16:31:24 1996 *************** *** 197,207 **** return b ? PUTBLOCK(b, l) : HT_OK; else { MIMEMakeRequest(me, me->request); ! if (HTRequest_isDestination(me->request)) { ! (*me->target->isa->flush)(me->target); ! HTNet_setBytesWritten(me->request->net, 0); } ! me->transparent = YES; return b ? PUTBLOCK(b, l) : HT_OK; } } --- 197,210 ---- return b ? PUTBLOCK(b, l) : HT_OK; else { MIMEMakeRequest(me, me->request); ! #if 0 ! if ((status = PUTBLOCK(HTChunk_data(me->buffer), ! HTChunk_size(me->buffer))) == HT_OK) { ! me->transparent = YES; ! return b ? PUTBLOCK(b, l) : HT_OK; } ! #endif ! me->transparent = YES; return b ? PUTBLOCK(b, l) : HT_OK; } } diff -c Library/Repository/Implementation/HTNet.c:2.44.2.1 Library/Repository/Implementation/HTNet.c:2.44 *** Library/Repository/Implementation/HTNet.c:2.44.2.1 Tue Jan 23 16:31:25 1996 --- Library/Repository/Implementation/HTNet.c Tue Jan 23 16:31:25 1996 *************** *** 503,520 **** /* Close socket */ if (net->sockfd != INVSOC) { - HTEvent_UnRegister(net->sockfd, (SockOps) FD_ALL); if (HTDNS_socket(net->dns) == INVSOC) { if ((status = NETCLOSE(net->sockfd)) < 0) HTRequest_addSystemError(net->request, ERR_FATAL, socerrno, NO, "NETCLOSE"); if (WWWTRACE) TTYPrint(TDEST, "HTNet_delete closing %d\n", net->sockfd); } else { if (WWWTRACE) TTYPrint(TDEST, "HTNet_delete keeping %d\n", net->sockfd); HTDNS_clearActive(net->dns); /* Here we should probably use a low priority */ HTEvent_Register(net->sockfd, net->request, (SockOps) FD_READ, HTDNS_closeSocket, net->priority); } --- 503,521 ---- /* Close socket */ if (net->sockfd != INVSOC) { if (HTDNS_socket(net->dns) == INVSOC) { if ((status = NETCLOSE(net->sockfd)) < 0) HTRequest_addSystemError(net->request, ERR_FATAL, socerrno, NO, "NETCLOSE"); if (WWWTRACE) TTYPrint(TDEST, "HTNet_delete closing %d\n", net->sockfd); + HTEvent_UnRegister(net->sockfd, (SockOps) FD_ALL); } else { if (WWWTRACE) TTYPrint(TDEST, "HTNet_delete keeping %d\n", net->sockfd); HTDNS_clearActive(net->dns); /* Here we should probably use a low priority */ + HTEvent_UnRegister(net->sockfd, (SockOps) FD_ALL); HTEvent_Register(net->sockfd, net->request, (SockOps) FD_READ, HTDNS_closeSocket, net->priority); } diff -c Library/Repository/Implementation/HTNetMan.html:2.5.4.1 Library/Repository/Implementation/HTNetMan.html:2.6 *** Library/Repository/Implementation/HTNetMan.html:2.5.4.1 Tue Jan 23 16:31:26 1996 --- Library/Repository/Implementation/HTNetMan.html Tue Jan 23 16:31:26 1996 *************** *** 1,7 ****Asyncronous Socket Management ! --- 1,7 ----Asyncronous Socket Management ! *************** *** 65,85 **** int home; /* Current home if multiple */ time_t connecttime; /* Used on multihomed hosts */ long bytes_read; /* Bytes read from network */ ! long bytes_written; /* Bytes written to network */ ! BOOL preemtive; /* Eff result from Request and Protocol */ HTPriority priority; /* Priority of this request (event) */ HTEventCallback * cbf; /* Library load routine */ HTRequest * request; /* Link back to request structure */ void * context; /* Protocol Specific context */ }; ! #define HTNet_bytesRead(me) ((me) ? (me)->bytes_read : -1) ! #define HTNet_bytesWritten(me) ((me) ? (me)->bytes_written : -1) ! ! #define HTNet_setBytesRead(me,l) ((me) ? (me->bytes_read=(l)) : -1) ! #define HTNet_setBytesWritten(me,l) ((me) ? (me->bytes_written=(l)) :-1) ! ! #define HTNet_dns(me) ((me) ? (me)->dns : NULL)--- 65,79 ---- int home; /* Current home if multiple */ time_t connecttime; /* Used on multihomed hosts */ long bytes_read; /* Bytes read from network */ ! BOOL preemptive; /* Eff result from Request and Protocol */ HTPriority priority; /* Priority of this request (event) */ HTEventCallback * cbf; /* Library load routine */ HTRequest * request; /* Link back to request structure */ void * context; /* Protocol Specific context */ }; ! #define HTNet_bytesRead(me) ((me) ? (me)->bytes_read : -1) ! #define HTNet_dns(me) ((me) ? (me)->dns : NULL)diff -c Library/Repository/Implementation/HTProt.html:2.11 Library/Repository/Implementation/HTProt.html:2.12 *** Library/Repository/Implementation/HTProt.html:2.11 Tue Jan 23 16:31:27 1996 --- Library/Repository/Implementation/HTProt.html Tue Jan 23 16:31:27 1996 *************** *** 59,69 **** access acheme. For example HTTP.c is bound to http URLs. The call back function is the function to be called for loading. The reason why it is of type HTEventCallback is that it then can be used directly in the ! event loop when used in non-preemtive mode.!extern BOOL HTProtocol_add (CONST char * name, ! BOOL preemtive, HTEventCallback * client, HTEventCallback * server);--- 59,69 ---- access acheme. For example HTTP.c is bound to http URLs. The call back function is the function to be called for loading. The reason why it is of type HTEventCallback is that it then can be used directly in the ! event loop when used in non-preemptive mode.extern BOOL HTProtocol_add (CONST char * name, ! BOOL preemptive, HTEventCallback * client, HTEventCallback * server);*************** *** 106,118 **** extern HTEventCallback * HTProtocol_server (HTProtocol * protocol);Is Access Scheme Preemtive
Returns YES if the implementation of the access scheme supports ! preemtive access only.! extern BOOL HTProtocol_preemtive (HTProtocol * protocol);--- 106,118 ---- extern HTEventCallback * HTProtocol_server (HTProtocol * protocol);!Is Access Scheme Preemptive
Returns YES if the implementation of the access scheme supports ! preemptive access only.! extern BOOL HTProtocol_preemptive (HTProtocol * protocol);diff -c Library/Repository/Implementation/HTReq.html:2.17.2.1 Library/Repository/Implementation/HTReq.html:2.18 *** Library/Repository/Implementation/HTReq.html:2.17.2.1 Tue Jan 23 16:31:28 1996 --- Library/Repository/Implementation/HTReq.html Tue Jan 23 16:31:28 1996 *************** *** 1,7 ****-Public Declaration of Request Manager !--- 1,7 ---- Public Declaration of Request Manager !*************** *** 85,102 **** extern HTRequest * HTRequest_dup (HTRequest * src); Create a duplicate for Internal use
- - Creates a new HTRequest object as a duplicate of the src request. The - difference to the HTRequest_dup function is that we don't copy the - error_stack and other information that the application keeps in its - copy of the request object. Otherwise it will be freed multiple times. - Returns YES if OK, else NO - -- extern HTRequest * HTRequest_dupInternal (HTRequest * src); --Delete Object
This function deletes the object and cleans up the memory. --- 85,90 ---- *************** *** 164,182 **** extern HTReload HTRequest_reloadMode (HTRequest *request);Redirections
- - When a redirection response is returned to the Library, for example - from a remote HTTP server, this code is passed back to the - application. The application can then decide whether a new request - should be established or not. These two methods return the redirection - information required to issue a new request, that is the new anchor - and any list of keywords associated with this anchor. - -- extern HTAnchor * HTRequest_redirection (HTRequest * request); --Max number of Retrys for a Down Load
Automatic reload can happen in two situations: --- 152,157 ---- *************** *** 499,507 **** extern void *HTRequest_context (HTRequest *request);Preemtive or Non-preemtive Access
! A access scheme is defined with a default for using either preemtive (blocking I/O) or non-premitve (non-blocking I/O). This is basically a result of the implementation of the protocol module itself. However, if non-blocking I/O is the default then some times it is nice to be --- 474,482 ---- extern void *HTRequest_context (HTRequest *request);Preemptive or Non-preemptive Access
! A access scheme is defined with a default for using either preemptive (blocking I/O) or non-premitve (non-blocking I/O). This is basically a result of the implementation of the protocol module itself. However, if non-blocking I/O is the default then some times it is nice to be *************** *** 510,517 **** non-blocking.! extern void HTRequest_setPreemtive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemtive (HTRequest *request);Priority Management
--- 485,492 ---- non-blocking.! extern void HTRequest_setPreemptive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemptive (HTRequest *request);Priority Management
*************** *** 586,602 **** char * syscall);
! extern long HTRequest_bytesRead (HTRequest * request); ! extern long HTRequest_bytesWritten (HTRequest * request);
! extern long HTRequest_bytesRead(HTRequest * request);
struct _HTRequest { - - BOOL internal; /* Does the app knows about this one? */ - HTMethod method; HTReload reload; char * boundary; /* MIME multipart boundary */ int retrys; /* Number of automatic reloads */ time_t retry_after; /* Absolut time for a retry */ --- 49,58 ----struct _HTRequest { HTMethod method; HTReload reload; + char * redirect; /* Location or URI */ char * boundary; /* MIME multipart boundary */ int retrys; /* Number of automatic reloads */ time_t retry_after; /* Absolut time for a retry */ *************** *** 103,117 **** HTParentAnchor * parentAnchor; /* For referer field */-Redirection
- - If we get a redirection back then we return the new destination for - this request to the application using this anchor. - -- HTAnchor * redirectionAnchor; /* Redirection URL */ --Streams From Network to Application
--- 101,106 ---- *************** *** 145,151 ****Other Flags
! BOOL preemtive; BOOL ContentNegotiation; BOOL using_proxy;--- 134,140 ----Other Flags
! BOOL preemptive; BOOL ContentNegotiation; BOOL using_proxy;*************** *** 210,216 ****extern BOOL HTRequest_addDestination (HTRequest * src, HTRequest * dest); extern BOOL HTRequest_removeDestination (HTRequest * dest); - extern BOOL HTRequest_destinationsReady (HTRequest * me); extern BOOL HTRequest_linkDestination (HTRequest * dest); extern BOOL HTRequest_unlinkDestination (HTRequest * dest); --- 199,204 ---- diff -c Library/Repository/Implementation/HTSocket.c:2.19.2.1 Library/Repository/Implementation/HTSocket.c:2.19 *** Library/Repository/Implementation/HTSocket.c:2.19.2.1 Tue Jan 23 16:31:32 1996 --- Library/Repository/Implementation/HTSocket.c Tue Jan 23 16:31:33 1996 *************** *** 114,121 **** net->cbf, net->priority); return HT_WOULD_BLOCK; } else { /* We have a real error */ ! HTRequest_addSystemError(request, ERR_FATAL, socerrno, NO, ! "NETREAD"); return HT_ERROR; } } else if (!b_read) { --- 114,122 ---- net->cbf, net->priority); return HT_WOULD_BLOCK; } else { /* We have a real error */ ! if (PROT_TRACE) ! TTYPrint(TDEST, "Read Socket. READ ERROR %d\n", ! socerrno); return HT_ERROR; } } else if (!b_read) { diff -c Library/Repository/Implementation/HTTP.c:1.111.2.1 Library/Repository/Implementation/HTTP.c:1.111 *** Library/Repository/Implementation/HTTP.c:1.111.2.1 Tue Jan 23 16:31:34 1996 --- Library/Repository/Implementation/HTTP.c Tue Jan 23 16:31:34 1996 *************** *** 61,69 **** HTTP_BEGIN = 0, HTTP_NEED_CONNECTION, HTTP_NEED_REQUEST, ! HTTP_PERM_REDIRECT, ! HTTP_TEMP_REDIRECT, HTTP_NOT_MODIFIED, HTTP_AA } HTTPState; --- 61,69 ---- HTTP_BEGIN = 0, HTTP_NEED_CONNECTION, HTTP_NEED_REQUEST, ! HTTP_REDIRECTION, HTTP_NOT_MODIFIED, + HTTP_EXPIRED, HTTP_AA } HTTPState; *************** *** 104,112 **** http_info *http = (http_info *) net->context; /* Free stream with data TO network */ ! 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 --- 104,110 ---- http_info *http = (http_info *) net->context; /* Free stream with data TO network */ ! if (!HTRequest_isDestination(req) && req->input_stream) { if (status == HT_INTERRUPTED) (*req->input_stream->isa->abort)(req->input_stream, NULL); else *************** *** 114,129 **** req->input_stream = NULL; } - /* Free user part of stream pipe if error */ - if (!net->target && req->output_stream) - (*req->output_stream->isa->abort)(req->output_stream, NULL); - /* Remove the request object and our own context structure for http */ ! HTNet_delete(net, req->internal ? HT_IGNORE : status); FREE(http); return YES; } /* ** This is a big switch handling all HTTP return codes. It puts in any ** appropiate error message and decides whether we should expect data --- 112,163 ---- req->input_stream = NULL; } /* Remove the request object and our own context structure for http */ ! HTNet_delete(net, status); FREE(http); return YES; } + + PRIVATE BOOL HTTPAuthentication (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; + } + + /* ** This is a big switch handling all HTTP return codes. It puts in any ** appropiate error message and decides whether we should expect data *************** *** 135,183 **** case 0: /* 0.9 response */ case 200: - me->http->next = HTTP_GOT_DATA; - break; - case 201: - HTRequest_addError(me->request, ERR_INFO, NO, HTERR_CREATED, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); - me->http->next = HTTP_GOT_DATA; - break; - case 202: - HTRequest_addError(me->request, ERR_INFO, NO, HTERR_ACCEPTED, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); - me->http->next = HTTP_GOT_DATA; - break; - case 203: - HTRequest_addError(me->request, ERR_INFO, NO, HTERR_PARTIAL, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); me->http->next = HTTP_GOT_DATA; break; case 204: /* No Response */ - HTRequest_addError(me->request, ERR_INFO, NO, HTERR_NO_CONTENT, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); me->http->next = HTTP_NO_DATA; break; case 301: /* Moved */ - HTRequest_addError(me->request, ERR_INFO, NO, HTERR_MOVED, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); - me->http->next = HTTP_PERM_REDIRECT; - break; - case 302: /* Found */ ! HTRequest_addError(me->request, ERR_INFO, NO, HTERR_FOUND, ! me->reason, (int) strlen(me->reason), ! "HTTPNextState"); ! me->http->next = HTTP_TEMP_REDIRECT; break; case 303: /* Method */ --- 169,187 ---- case 0: /* 0.9 response */ case 200: case 201: case 202: case 203: me->http->next = HTTP_GOT_DATA; break; case 204: /* No Response */ me->http->next = HTTP_NO_DATA; break; case 301: /* Moved */ case 302: /* Found */ ! me->http->next = HTTP_REDIRECTION; break; case 303: /* Method */ *************** *** 188,196 **** break; case 304: /* Not Modified */ - HTRequest_addError(me->request, ERR_FATAL, NO, HTERR_NOT_MODIFIED, - me->reason, (int) strlen(me->reason), - "HTTPNextState"); me->http->next = HTTP_NOT_MODIFIED; break; --- 192,197 ---- *************** *** 350,356 **** *ptr = '\0'; /* Set up the streams */ ! if (me->status==200) { HTStream *s; me->target = HTStreamStack(WWW_MIME, req->output_format, req->output_stream, req, NO); --- 351,357 ---- *ptr = '\0'; /* Set up the streams */ ! if (me->status==200 && req->method==METHOD_GET) { HTStream *s; me->target = HTStreamStack(WWW_MIME, req->output_format, req->output_stream, req, NO); *************** *** 492,499 **** int status = HT_ERROR; HTNet *net = request->net; /* Generic protocol information */ http_info *http; /* Specific protocol information */ ! HTParentAnchor *anchor = HTRequest_anchor(request); ! /* ** Initiate a new http structure and bind to request structure ** This is actually state HTTP_BEGIN, but it can't be in the state --- 493,499 ---- int status = HT_ERROR; HTNet *net = request->net; /* Generic protocol information */ http_info *http; /* Specific protocol information */ ! /* ** Initiate a new http structure and bind to request structure ** This is actually state HTTP_BEGIN, but it can't be in the state *************** *** 501,516 **** */ if (ops == FD_NONE) { if (PROT_TRACE) TTYPrint(TDEST, "HTTP........ Looking for `%s\'\n", ! HTAnchor_physical(anchor)); if ((http = (http_info *) calloc(1, sizeof(http_info))) == NULL) outofmem(__FILE__, "HTLoadHTTP"); http->state = HTTP_BEGIN; http->next = HTTP_ERROR; net->context = http; } else if (ops == FD_CLOSE) { /* Interrupted */ ! HTRequest_addError(request, ERR_FATAL, NO, HTERR_INTERRUPTED, ! NULL, 0, "HTLoadHTTP"); ! HTTPCleanup(request, HT_INTERRUPTED); return HT_OK; } else http = (http_info *) net->context; /* Get existing copy */ --- 501,521 ---- */ if (ops == FD_NONE) { if (PROT_TRACE) TTYPrint(TDEST, "HTTP........ Looking for `%s\'\n", ! HTAnchor_physical(request->anchor)); if ((http = (http_info *) calloc(1, sizeof(http_info))) == NULL) outofmem(__FILE__, "HTLoadHTTP"); http->state = HTTP_BEGIN; http->next = HTTP_ERROR; net->context = http; } else if (ops == FD_CLOSE) { /* Interrupted */ ! #if 1 ! if (HTRequest_isPostWeb(request)) ! #else ! if(HTRequest_isPostWeb(request)&&!HTRequest_isMainDestination(request)) ! #endif ! HTTPCleanup(request, HT_IGNORE); ! else ! HTTPCleanup(request, HT_INTERRUPTED); return HT_OK; } else http = (http_info *) net->context; /* Get existing copy */ *************** *** 538,544 **** break; case HTTP_NEED_CONNECTION: /* Now let's set up a connection */ ! status = HTDoConnect(net, HTAnchor_physical(anchor), HTTP_PORT); if (status == HT_OK) { --- 543,549 ---- break; case HTTP_NEED_CONNECTION: /* Now let's set up a connection */ ! status = HTDoConnect(net, HTAnchor_physical(request->anchor), HTTP_PORT); if (status == HT_OK) { *************** *** 566,572 **** ** 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, HTLoadHTTP, net->priority); HTRequest_linkDestination(request); --- 571,577 ---- ** 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, HTLoadHTTP, net->priority); HTRequest_linkDestination(request); *************** *** 574,581 **** /* Set up stream FROM network and corresponding read buffer */ net->isoc = HTInputSocket_new(net->sockfd); - net->target = HTTPStatus_new(request, http); http->state = HTTP_NEED_REQUEST; } else if (status == HT_WOULD_BLOCK || status == HT_PERSISTENT) return HT_OK; --- 579,587 ---- /* Set up stream FROM network and corresponding read buffer */ net->isoc = HTInputSocket_new(net->sockfd); + /* @@@ USE STREAM STACK @@@ */ + net->target = HTTPStatus_new(request, http); http->state = HTTP_NEED_REQUEST; } else if (status == HT_WOULD_BLOCK || status == HT_PERSISTENT) return HT_OK; *************** *** 588,599 **** if (ops == FD_WRITE || ops == FD_NONE) { if (HTRequest_isDestination(request)) { HTNet *srcnet = request->source->net; ! if (srcnet) { ! HTEvent_Register(srcnet->sockfd, request->source, ! (SockOps) FD_READ, ! srcnet->cbf, srcnet->priority); ! HTEvent_UnRegister(net->sockfd, FD_WRITE); ! } return HT_OK; } status = request->PostCallback ? --- 594,603 ---- if (ops == FD_WRITE || ops == FD_NONE) { if (HTRequest_isDestination(request)) { HTNet *srcnet = request->source->net; ! TTYPrint(TDEST,"File Serve. HERE!\n"); ! HTEvent_Register(srcnet->sockfd, request->source, ! (SockOps) FD_READ, ! srcnet->cbf, srcnet->priority); return HT_OK; } status = request->PostCallback ? *************** *** 609,614 **** --- 613,620 ---- return HT_OK; else if (status == HT_LOADED) http->state = http->next; /* Jump to next state */ + else if (status == HT_RELOAD) + http->state = HTTP_EXPIRED; else http->state = HTTP_ERROR; } else { *************** *** 620,719 **** http->state = HTTP_ERROR; break; ! case HTTP_PERM_REDIRECT: ! 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); ! } ! HTTPCleanup(request, HT_PERM_REDIRECT); ! return HT_OK; ! break; ! ! case HTTP_TEMP_REDIRECT: ! 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); } - HTTPCleanup(request, HT_TEMP_REDIRECT); - return HT_OK; break; ! case HTTP_AA: ! 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); } - HTTPCleanup(request, HT_NO_ACCESS); - return HT_OK; break; ! case HTTP_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); } ! } ! HTTPCleanup(request, HT_LOADED); return HT_OK; break; case HTTP_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); } ! } ! HTTPCleanup(request, HT_NO_DATA); return HT_OK; break; case HTTP_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); ! } ! HTTPCleanup(request, HT_RETRY); return HT_OK; break; case HTTP_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); ! } ! HTTPCleanup(request, HT_ERROR); return HT_OK; break; } --- 626,821 ---- http->state = HTTP_ERROR; break; ! case HTTP_EXPIRED: ! #if 0 ! /* Dirty hack and fall through */ ! if (PROT_TRACE) TTYPrint(TDEST, "HTTP........ Expired\n"); ! request->redirect = request->anchor->address; ! #endif ! ! case HTTP_REDIRECTION: ! /* Clean up the other connections or just this one */ ! if (HTRequest_isPostWeb(request)) HTRequest_killPostWeb(request); ! else ! HTTPCleanup(request, HT_IGNORE); ! /* If we found a new URL in the response */ ! if (request->redirect) { ! if (status == 301) { ! HTRequest_addError(request, ERR_INFO, NO, HTERR_MOVED, ! (void *) request->redirect, ! (int) strlen(request->redirect), "HTLoadHTTP"); ! } else if (status == 302) { ! HTRequest_addError(request, ERR_INFO, NO, HTERR_FOUND, ! (void *) request->redirect, ! (int) strlen(request->redirect), "HTLoadHTTP"); ! } ! ! /* If we haven't reached the limit for redirection */ ! if (HTRequest_retry(request)) { ! HTAlertCallback *cbf = HTAlert_find(HT_A_CONFIRM); ! HTAnchor *anchor = HTAnchor_findAddress(request->redirect); ! ! /* Make sure that we don't get this from cache */ ! HTRequest_setReloadMode(request, HT_FORCE_RELOAD); ! ! if (HTRequest_isPostWeb(request)) { ! HTRequest *dest = HTRequest_mainDestination(request); ! if (cbf && (*cbf)(request, HT_A_CONFIRM, HT_MSG_MOVED, ! NULL, request->redirect, NULL)) { ! ! /* The new anchor inherits the Post Web */ ! HTAnchor_moveAllLinks((HTAnchor *) request->anchor, ! anchor); ! if (HTRequest_isSource(request)) ! HTRequest_delete(request); ! return HTCopyAnchor((HTAnchor *) anchor, dest) ? ! HT_OK : HT_ERROR; ! } ! return HT_OK; ! } if (request->PostCallback) { ! #if 0 ! return HTUploadAnchor((HTAnchor*) anchor, request) ? ! HT_OK : HT_ERROR; ! #endif ! } else { ! return HTLoadAnchor((HTAnchor *) anchor, request) ? ! HT_OK : HT_ERROR; ! } ! } else { ! HTRequest_addError(request, ERR_FATAL, NO, ! HTERR_MAX_REDIRECT,NULL,0,"HTLoadHTTP"); ! if (HTRequest_isPostWeb(request)) { ! BOOL main = HTRequest_isMainDestination(request); ! if (HTRequest_isDestination(request)) { ! HTLink *link = ! HTAnchor_findLink((HTAnchor *)request->source->anchor, ! (HTAnchor *)request->anchor); ! HTLink_setResult(link, HT_LINK_ERROR); ! } ! HTNet_callAfter(request, main ? HT_ERROR : HT_IGNORE); ! HTRequest_removeDestination(request); ! } ! return HT_OK; } ! } else { ! HTRequest_addError(request, ERR_FATAL, NO, HTERR_BAD_REPLY, ! NULL, 0, "HTLoadHTTP"); ! return HT_OK; } break; ! case HTTP_AA: ! /* Clean up the other connections or just this one */ ! if (HTRequest_isPostWeb(request)) HTRequest_killPostWeb(request); + else + HTTPCleanup(request, HT_IGNORE); + + /* Ask the user for a UserID and a passwd */ + if (HTTPAuthentication(request) && HTAA_retryWithAuth(request)) { + int ret; + + /* Make sure that we don't get this from cache */ + HTRequest_setReloadMode(request, HT_FORCE_RELOAD); + + if (HTRequest_isPostWeb(request)) { + HTRequest *dest = HTRequest_mainDestination(request); + HTAnchor_appendMethods(request->anchor, request->method); + ret=HTCopyAnchor((HTAnchor*)request->source->anchor, dest); + return ret ? HT_OK : HT_ERROR; + } else if (request->PostCallback) { + #if 0 + ret = HTUploadAnchor((HTAnchor*) request->anchor,request); + return ret ? HT_OK : HT_ERROR; + #endif + } else { + ret = HTLoadAnchor((HTAnchor *) request->anchor, request); + return ret ? HT_OK : HT_ERROR; + } + } else { /* If the guy said no :-( */ + HTRequest_addError(request, ERR_FATAL, NO, HTERR_UNAUTHORIZED, + NULL, 0, "HTLoadHTTP"); + if (HTRequest_isPostWeb(request)) { + BOOL main = HTRequest_isMainDestination(request); + if (HTRequest_isDestination(request)) { + HTLink *link = + HTAnchor_findLink((HTAnchor *) request->source->anchor, + (HTAnchor *) request->anchor); + HTLink_setResult(link, HT_LINK_ERROR); + } + HTNet_callAfter(request, main ? HT_ERROR : HT_IGNORE); + HTRequest_removeDestination(request); + } + return HT_OK; } break; ! case HTTP_GOT_DATA: if (HTRequest_isPostWeb(request)) { + HTTPCleanup(request, HTRequest_isMainDestination(request) ? + HT_LOADED : HT_IGNORE); if (HTRequest_isDestination(request)) { HTLink *link = HTAnchor_findLink((HTAnchor *) request->source->anchor, ! (HTAnchor *) request->anchor); HTLink_setResult(link, HT_LINK_OK); } ! HTRequest_removeDestination(request); ! } else ! HTTPCleanup(request, HT_LOADED); return HT_OK; break; case HTTP_NO_DATA: if (HTRequest_isPostWeb(request)) { + HTTPCleanup(request, HTRequest_isMainDestination(request) ? + HT_NO_DATA : HT_IGNORE); if (HTRequest_isDestination(request)) { HTLink *link = HTAnchor_findLink((HTAnchor *) request->source->anchor, ! (HTAnchor *) request->anchor); HTLink_setResult(link, HT_LINK_OK); } ! HTRequest_removeDestination(request); ! } else ! HTTPCleanup(request, HT_NO_DATA); return HT_OK; break; case HTTP_RETRY: if (HTRequest_isPostWeb(request)) { + HTTPCleanup(request, HTRequest_isMainDestination(request) ? + HT_RETRY : HT_IGNORE); + HTRequest_killPostWeb(request); if (HTRequest_isDestination(request)) { HTLink *link = HTAnchor_findLink((HTAnchor*) request->source->anchor, ! (HTAnchor*) request->anchor); HTLink_setResult(link, HT_LINK_ERROR); } ! HTRequest_removeDestination(request); ! } else ! HTTPCleanup(request, HT_RETRY); return HT_OK; break; case HTTP_ERROR: + /* Clean up the other connections or just this one */ if (HTRequest_isPostWeb(request)) { + HTTPCleanup(request, HTRequest_isMainDestination(request) ? + HT_ERROR : HT_IGNORE); + HTRequest_killPostWeb(request); if (HTRequest_isDestination(request)) { HTLink *link = HTAnchor_findLink((HTAnchor *) request->source->anchor, ! (HTAnchor *) request->anchor); HTLink_setResult(link, HT_LINK_ERROR); } ! HTRequest_removeDestination(request); ! } else ! HTTPCleanup(request, HT_ERROR); return HT_OK; break; } diff -c Library/Repository/Implementation/HTTPRes.c:2.2.2.1 Library/Repository/Implementation/HTTPRes.c:2.2 *** Library/Repository/Implementation/HTTPRes.c:2.2.2.1 Tue Jan 23 16:31:36 1996 --- Library/Repository/Implementation/HTTPRes.c Tue Jan 23 16:31:36 1996 *************** *** 76,81 **** --- 76,82 ---- PRIVATE void HTTPMakeResponse (HTStream * me, HTRequest * request) { char linebuf[256]; + HTParentAnchor *anchor = HTRequest_anchor(request); /* Generate the HTTP/1.0 ResponseLine */ if (request->error_stack) { diff -c Library/Repository/Implementation/HTTPServ.c:2.4.2.1 Library/Repository/Implementation/HTTPServ.c:2.4 *** Library/Repository/Implementation/HTTPServ.c:2.4.2.1 Tue Jan 23 16:31:37 1996 --- Library/Repository/Implementation/HTTPServ.c Tue Jan 23 16:31:37 1996 *************** *** 102,108 **** PRIVATE int ParseRequest (HTStream * me) { HTRequest * request = me->request; ! HTRequest * newreq = me->http->serve = HTRequest_dupInternal(request); char * line = HTChunk_data(me->buffer); char * method; char * request_uri; --- 102,108 ---- PRIVATE int ParseRequest (HTStream * me) { HTRequest * request = me->request; ! HTRequest * newreq = me->http->serve = HTRequest_dup(request); char * line = HTChunk_data(me->buffer); char * method; char * request_uri; diff -c Library/Repository/Implementation/HTUtils.html:2.51.2.1 Library/Repository/Implementation/HTUtils.html:2.51 *** Library/Repository/Implementation/HTUtils.html:2.51.2.1 Tue Jan 23 16:31:37 1996 --- Library/Repository/Implementation/HTUtils.html Tue Jan 23 16:31:37 1996 *************** *** 1,7 ****Utility macros ! --- 1,7 ----Utility macros ! *************** *** 277,287 **** #define HT_OK 0 /* Generic success */ #define HT_ALL 1 /* Used by Net Manager */ ! #define HT_PERSISTENT 29993 /* Wait for persistent connection */ ! #define HT_IGNORE 29994 /* Ignore this in the Net manager */ ! #define HT_NO_DATA 29995 /* OK but no data was loaded */ ! #define HT_PERM_REDIRECT 29997 /* Redo the retrieve with a new URL */ ! #define HT_TEMP_REDIRECT 29998 /* Redo the retrieve with a new URL */ #define HT_LOADED 29999 /* Instead of a socket */ #define HT_ERROR -1 /* Generic failure */ --- 277,287 ---- #define HT_OK 0 /* Generic success */ #define HT_ALL 1 /* Used by Net Manager */ ! #define HT_PERSISTENT 29995 /* Wait for persistent connection */ ! #define HT_IGNORE 29996 /* Ignore this in the Net manager */ ! #define HT_NO_DATA 29997 /* OK but no data was loaded */ ! #define HT_REDIRECTION_ON_FLY 29998 /* Redo the retrieve with a new URL */ ! #define HT_REDIRECT 29998 /* Redo the retrieve with a new URL */ #define HT_LOADED 29999 /* Instead of a socket */ #define HT_ERROR -1 /* Generic failure */ diff -c Library/Repository/Implementation/HTWriter.c:2.27.4.1 Library/Repository/Implementation/HTWriter.c:2.27 *** Library/Repository/Implementation/HTWriter.c:2.27.4.1 Tue Jan 23 16:31:38 1996 --- Library/Repository/Implementation/HTWriter.c Tue Jan 23 16:31:38 1996 *************** *** 18,24 **** #include "HTReq.h" #include "HTNetMan.h" #include "HTConLen.h" - #include "HTAlert.h" #include "HTWriter.h" /* Implemented here */ struct _HTStream { --- 18,23 ---- *************** *** 69,76 **** { int b_write; CONST char *limit = buf+len; - HTRequest * request = me->net->request; - HTNet * net = me->net; #ifdef NOT_ASCII if (me->make_ascii && len && !me->ascbuf) { /* Generate new buffer */ --- 68,73 ---- *************** *** 104,116 **** #endif { if (PROT_TRACE) ! TTYPrint(TDEST,"Write Socket WOULD BLOCK %d\n",me->sockfd); ! HTEvent_Register(me->sockfd, request, (SockOps) FD_WRITE, ! net->cbf, net->priority); return HT_WOULD_BLOCK; } else { ! HTRequest_addSystemError(request, ERR_FATAL, socerrno, NO, ! "NETWRITE"); return HT_ERROR; } } --- 101,113 ---- #endif { if (PROT_TRACE) ! TTYPrint(TDEST,"Write Socket WOULD BLOCK %d\n", me->sockfd); ! HTEvent_Register(me->sockfd,me->net->request,(SockOps)FD_WRITE, ! me->net->cbf, me->net->priority); return HT_WOULD_BLOCK; } else { ! if (PROT_TRACE) ! TTYPrint(TDEST, "Write Socket WRITE ERROR %d\n", socerrno); return HT_ERROR; } } *************** *** 120,130 **** if (PROT_TRACE) TTYPrint(TDEST, "Write Socket %d bytes written to socket %d\n", b_write, me->sockfd); - net->bytes_written += b_write; - { - HTAlertCallback *cbf = HTAlert_find(HT_PROG_READ); - if (cbf) (*cbf)(request, HT_PROG_WRITE,HT_MSG_NULL,NULL,NULL,NULL); - } } #ifdef NOT_ASCII FREE(me->ascbuf); --- 117,122 ---- diff -c Library/Repository/Implementation/Version.make:1.47.2.1 Library/Repository/Implementation/Version.make:1.47 *** Library/Repository/Implementation/Version.make:1.47.2.1 Tue Jan 23 16:31:39 1996 --- Library/Repository/Implementation/Version.make Tue Jan 23 16:31:39 1996 *************** *** 1 **** ! VC = 4.0C --- 1 ---- ! VC = 4.0B diff -c Library/Repository/Implementation/windows/wwwcore.def:1.5.2.2 Library/Repository/Implementation/windows/wwwcore.def:1.5 *** Library/Repository/Implementation/windows/wwwcore.def:1.5.2.2 Tue Jan 23 16:31:41 1996 --- Library/Repository/Implementation/windows/wwwcore.def Tue Jan 23 16:31:42 1996 *************** *** 190,208 **** HTEvent_getWinHandle @ 1003 HTEvent_winHandle @ 1004 HTEvent_setWinHandle @ 1005 ! HTEvent_getWinHandle @ 1006 ! HTEvent_registerTimeout @ 1007 ! HTEvent_unregisterTimeout @ 1008 ! HTEvent_RegisterTTY @ 1009 ! HTEvent_UnRegisterTTY @ 1010 ! HTEvent_Register @ 1011 ! HTEvent_UnRegister @ 1012 ! HTEvent_Retrieve @ 1013 ! HTEvent_UnregisterAll @ 1014 ! AsyncWindowProc @ 1015 HTEvent_Loop @ 1016 - AsyncWindowProc @ 1017 - HTEvent_Loop @ 1018 ;HTFormat.c @ 1100 HTPresentation_add @ 1101 --- 190,206 ---- HTEvent_getWinHandle @ 1003 HTEvent_winHandle @ 1004 HTEvent_setWinHandle @ 1005 ! HTEvent_registerTimeout @ 1006 ! HTEvent_unregisterTimeout @ 1007 ! HTEvent_RegisterTTY @ 1008 ! HTEvent_UnRegisterTTY @ 1009 ! HTEvent_Register @ 1010 ! HTEvent_UnRegister @ 1011 ! HTEvent_Retrieve @ 1012 ! HTEvent_UnregisterAll @ 1013 ! AsyncWindowProc @ 1014 ! HTEvent_Loop @ 1015 HTEvent_Loop @ 1016 ;HTFormat.c @ 1100 HTPresentation_add @ 1101 *************** *** 295,377 **** ;HTReqMan.c @ 1700 HTRequest_new @ 1701 HTRequest_dup @ 1702 ! HTRequest_dupInternal @ 1703 ! HTRequest_delete @ 1704 ! HTRequest_setMethod @ 1705 ! HTRequest_method @ 1706 ! HTRequest_setReloadMode @ 1707 ! HTRequest_reloadMode @ 1708 ! HTRequest_setConversion @ 1709 ! HTRequest_conversion @ 1710 ! HTRequest_setEncoding @ 1711 ! HTRequest_encoding @ 1712 ! HTRequest_setLanguage @ 1713 ! HTRequest_language @ 1714 ! HTRequest_setCharset @ 1715 ! HTRequest_charset @ 1716 ! HTRequest_setGenerator @ 1717 ! HTRequest_generator @ 1718 ! HTRequest_setParser @ 1719 ! HTRequest_parser @ 1720 ! HTRequest_setGnHd @ 1721 ! HTRequest_addGnHd @ 1722 ! HTRequest_gnHd @ 1723 ! HTRequest_setRqHd @ 1724 ! HTRequest_addRqHd @ 1725 ! HTRequest_rqHd @ 1726 ! HTRequest_setRsHd @ 1727 ! HTRequest_addRsHd @ 1728 ! HTRequest_rsHd @ 1729 ! HTRequest_setEnHd @ 1730 ! HTRequest_addEnHd @ 1731 ! HTRequest_enHd @ 1732 ! HTRequest_setAccess @ 1733 ! HTRequest_access @ 1734 ! HTRequest_setAnchor @ 1735 ! HTRequest_anchor @ 1736 ! HTRequest_setParent @ 1737 ! HTRequest_parent @ 1738 ! HTRequest_setOutputStream @ 1739 ! HTRequest_outputStream @ 1740 ! HTRequest_setOutputFormat @ 1741 ! HTRequest_outputFormat @ 1742 ! HTRequest_setDebugStream @ 1743 ! HTRequest_debugStream @ 1744 ! HTRequest_setDebugFormat @ 1745 ! HTRequest_debugFormat @ 1746 ! HTRequest_setCallback @ 1747 ! HTRequest_callback @ 1748 ! HTRequest_setContext @ 1749 ! HTRequest_context @ 1750 ! HTRequest_setPreemtive @ 1751 ! HTRequest_preemtive @ 1752 ! HTRequest_setNegotiation @ 1753 ! HTRequest_negotiation @ 1754 ! HTRequest_bytesRead @ 1755 ! HTRequest_bytesWritten @ 1756 ! HTRequest_kill @ 1757 ! HTRequest_error @ 1758 ! HTRequest_setError @ 1759 ! HTRequest_addError @ 1760 ! HTRequest_addSystemError @ 1761 ! HTRequest_retryTime @ 1762 ! HTRequest_redirection @ 1763 ! HTRequest_setMaxRetry @ 1764 ! HTRequest_maxRetry @ 1765 ! HTRequest_retry @ 1766 ! HTRequest_setPriority @ 1767 ! HTRequest_priority @ 1768 ! HTRequest_setNet @ 1769 ! HTRequest_net @ 1770 ! HTRequest_addDestination @ 1771 ! HTRequest_removeDestination @ 1772 ! HTRequest_destinationsReady @ 1773 ! HTRequest_linkDestination @ 1774 ! HTRequest_unlinkDestination @ 1775 ! HTRequest_removePostWeb @ 1776 ! HTRequest_killPostWeb @ 1777 ! HTLoad @ 1778 ! HTServ @ 1779 ;HTSocket.c @ 1800 HTInputSocket_new @ 1801 --- 293,371 ---- ;HTReqMan.c @ 1700 HTRequest_new @ 1701 HTRequest_dup @ 1702 ! HTRequest_delete @ 1703 ! HTRequest_setMethod @ 1704 ! HTRequest_method @ 1705 ! HTRequest_setReloadMode @ 1706 ! HTRequest_reloadMode @ 1707 ! HTRequest_setConversion @ 1708 ! HTRequest_conversion @ 1709 ! HTRequest_setEncoding @ 1710 ! HTRequest_encoding @ 1711 ! HTRequest_setLanguage @ 1712 ! HTRequest_language @ 1713 ! HTRequest_setCharset @ 1714 ! HTRequest_charset @ 1715 ! HTRequest_setGenerator @ 1716 ! HTRequest_generator @ 1717 ! HTRequest_setParser @ 1718 ! HTRequest_parser @ 1719 ! HTRequest_setGnHd @ 1720 ! HTRequest_addGnHd @ 1721 ! HTRequest_gnHd @ 1722 ! HTRequest_setRqHd @ 1723 ! HTRequest_addRqHd @ 1724 ! HTRequest_rqHd @ 1725 ! HTRequest_setRsHd @ 1726 ! HTRequest_addRsHd @ 1727 ! HTRequest_rsHd @ 1728 ! HTRequest_setEnHd @ 1729 ! HTRequest_addEnHd @ 1730 ! HTRequest_enHd @ 1731 ! HTRequest_setAccess @ 1732 ! HTRequest_access @ 1733 ! HTRequest_setAnchor @ 1734 ! HTRequest_anchor @ 1735 ! HTRequest_setParent @ 1736 ! HTRequest_parent @ 1737 ! HTRequest_setOutputStream @ 1738 ! HTRequest_outputStream @ 1739 ! HTRequest_setOutputFormat @ 1740 ! HTRequest_outputFormat @ 1741 ! HTRequest_setDebugStream @ 1742 ! HTRequest_debugStream @ 1743 ! HTRequest_setDebugFormat @ 1744 ! HTRequest_debugFormat @ 1745 ! HTRequest_setCallback @ 1746 ! HTRequest_callback @ 1747 ! HTRequest_setContext @ 1748 ! HTRequest_context @ 1749 ! HTRequest_setPreemtive @ 1750 ! HTRequest_preemtive @ 1751 ! HTRequest_setNegotiation @ 1752 ! HTRequest_negotiation @ 1753 ! HTRequest_bytesRead @ 1754 ! HTRequest_kill @ 1755 ! HTRequest_error @ 1756 ! HTRequest_setError @ 1757 ! HTRequest_addError @ 1758 ! HTRequest_addSystemError @ 1759 ! HTRequest_retryTime @ 1760 ! HTRequest_setMaxRetry @ 1761 ! HTRequest_maxRetry @ 1762 ! HTRequest_retry @ 1763 ! HTRequest_setPriority @ 1764 ! HTRequest_priority @ 1765 ! HTRequest_setNet @ 1766 ! HTRequest_net @ 1767 ! HTRequest_addDestination @ 1768 ! HTRequest_removeDestination @ 1769 ! HTRequest_linkDestination @ 1770 ! HTRequest_unlinkDestination @ 1771 ! HTRequest_removePostWeb @ 1772 ! HTRequest_killPostWeb @ 1773 ! HTLoad @ 1774 ! HTServ @ 1775 ;HTSocket.c @ 1800 HTInputSocket_new @ 1801 diff -c Library/Repository/Implementation/windows/wwwhttp.def:1.3.2.1 Library/Repository/Implementation/windows/wwwhttp.def:1.3 *** Library/Repository/Implementation/windows/wwwhttp.def:1.3.2.1 Tue Jan 23 16:31:42 1996 --- Library/Repository/Implementation/windows/wwwhttp.def Tue Jan 23 16:31:43 1996 *************** *** 3,9 **** HTAA_composeAuth @ 101 HTPasswordDialog @ 102 HTAA_retryWithAuth @ 103 - HTAA_authentication @ 104 ;HTAAUtil.c @ 200 HTAAScheme_enum @ 201 --- 3,8 ---- diff -c Library/Repository/Implementation/windows/wwwutils.def:1.4.2.1 Library/Repository/Implementation/windows/wwwutils.def:1.4 *** Library/Repository/Implementation/windows/wwwutils.def:1.4.2.1 Tue Jan 23 16:31:43 1996 --- Library/Repository/Implementation/windows/wwwutils.def Tue Jan 23 16:31:43 1996 *************** *** 23,32 **** HTChunk_clear @ 402 HTChunk_delete @ 403 HTChunk_putc @ 404 ! HTChunk_ensure @ 405 ! HTChunk_terminate @ 406 ! HTChunk_puts @ 407 ! HTChunk_putb @ 408 ;HTList.c @ 500 HTList_new @ 501 --- 23,32 ---- HTChunk_clear @ 402 HTChunk_delete @ 403 HTChunk_putc @ 404 ! HTChunk_puts @ 405 ! HTChunk_putb @ 406 ! HTChunk_ensure @ 407 ! HTChunk_terminate @ 408 ;HTList.c @ 500 HTList_new @ 501 diff -c Library/Repository/User/ReleaseNotes.html:1.20 Library/Repository/User/ReleaseNotes.html:1.21 *** Library/Repository/User/ReleaseNotes.html:1.20 Tue Jan 23 16:31:44 1996 --- Library/Repository/User/ReleaseNotes.html Tue Jan 23 16:31:44 1996 *************** *** 88,94 **** HREF="../Implementation/WWWMIME.html">WWWMIME.html, and WWWFTP.html include files to be used by applications. !
preemtive
to preemptive
it was a spelling mistake
preemptive
to preemptive
it was a spelling mistake
extern BOOL HTProtocol_add (CONST char * scheme, ! BOOL preemtive, HTEventCallBack * callback);--- 36,42 ----
extern BOOL HTProtocol_add (CONST char * scheme, ! BOOL preemptive, HTEventCallBack * callback);*************** *** 48,58 **** with the Telnet access module which also can handle rlogin and tn3270 terminal sessions.
! The next argument describes to the Library whether it is capable of handling non-blocking sockets or ! not. This is normally a design decision when implementing the protocol module, and we will not ! stretch this argument anymore in this guide. The Library Architecture ! document discusses in more detail how a protocol module can be designed to support non-blocking ! sockets.
The last argument is the actual function name to call when a request has been issued and a protocol module has been found associated with the access scheme used. Even though it is not clear at this --- 48,61 ---- with the Telnet access module which also can handle rlogin and tn3270 terminal sessions.
! The preemptive
argument describes to the Library whether it is
! capable of handling non-blocking sockets or not. This is normally a design decision when
! implementing the protocol module in that a module implemented for using blocking sockets normally
! can't use non-blocking sockets. However, the other way is often possible, and in some situations it
! is advantageous to use blocking sockets. The Library allows this to happen on a pr request basic as
! explained in the section "The Request Object". The Library Architecture document discusses in more detail how a protocol
! module can be designed to support non-blocking sockets.
The last argument is the actual function name to call when a request has been issued and a protocol module has been found associated with the access scheme used. Even though it is not clear at this diff -c Library/Repository/User/Using/Net.html:1.2.2.1 Library/Repository/User/Using/Net.html:1.2 *** Library/Repository/User/Using/Net.html:1.2.2.1 Tue Jan 23 16:31:54 1996 --- Library/Repository/User/Using/Net.html Tue Jan 23 16:31:55 1996 *************** *** 1,7 ****
! extern void HTRequest_setPreemtive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemtive (HTRequest *request);
! extern void HTRequest_setPreemptive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemptive (HTRequest *request);
extern BOOL HTProtocol_add (const char * name, ! BOOL preemtive, HTEventCallBack * callback);--- 200,206 ----
extern BOOL HTProtocol_add (const char * name, ! BOOL preemptive, HTEventCallBack * callback);diff -c Library/Repository/User/Using/choppy.html:1.15 Library/Repository/User/Using/choppy.html:1.16 *** Library/Repository/User/Using/choppy.html:1.15 Tue Jan 23 16:31:57 1996 --- Library/Repository/User/Using/choppy.html Tue Jan 23 16:31:57 1996 *************** *** 269,275 ****
extern BOOL HTProtocol_add (const char * name, ! BOOL preemtive, HTEventCallBack * callback);--- 269,275 ----
extern BOOL HTProtocol_add (const char * name, ! BOOL preemptive, HTEventCallBack * callback);*************** *** 841,847 ****
extern BOOL HTProtocol_add (CONST char * scheme, ! BOOL preemtive, HTEventCallBack * callback);--- 841,847 ----
extern BOOL HTProtocol_add (CONST char * scheme, ! BOOL preemptive, HTEventCallBack * callback);*************** *** 2169,2177 **** extern void *HTRequest_context (HTRequest *request); !
! extern void HTRequest_setPreemtive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemtive (HTRequest *request);
! extern void HTRequest_setPreemptive (HTRequest *request, BOOL mode); ! extern BOOL HTRequest_preemptive (HTRequest *request);
+ delete + URL to delete: http://www.w3.org +
-dest
command line option.
-dest
command line option.
listen
queue
! listen
queue
!