Diff for /libwww/Library/src/HTHome.c between versions 2.15 and 2.16

version 2.15, 1996/04/14 01:23:05 version 2.16, 1996/05/20 15:06:47
Line 30 Line 30
 #include "WWWApp.h"  #include "WWWApp.h"
 #include "WWWCache.h"  #include "WWWCache.h"
 #include "WWWRules.h"  #include "WWWRules.h"
 #include "HTReqMan.h"  
 #include "HTHome.h"                                      /* Implemented here */  #include "HTHome.h"                                      /* Implemented here */
   
 /* ------------------------------------------------------------------------- */  /* ------------------------------------------------------------------------- */
Line 48 Line 47
 PUBLIC char * HTFindRelatedName (void)  PUBLIC char * HTFindRelatedName (void)
 {  {
     char* default_default = NULL;             /* Parse home relative to this */      char* default_default = NULL;             /* Parse home relative to this */
     const char *host = HTGetHostName();       char * host = HTGetHostName(); 
     StrAllocCopy(default_default, "file://");      StrAllocCopy(default_default, "file://");
     if (host)      if (host) {
         StrAllocCat(default_default, host);          StrAllocCat(default_default, host);
     else          HT_FREE(host);
       } else
         StrAllocCat(default_default, "localhost");          StrAllocCat(default_default, "localhost");
     {      {
         char wd[HT_MAX_PATH+1];          char wd[HT_MAX_PATH+1];
Line 199  PUBLIC HTParentAnchor * HTHomeAnchor (vo Line 199  PUBLIC HTParentAnchor * HTHomeAnchor (vo
 */  */
 PUBLIC int HTLoadStart (HTRequest * request, void * param, int status)  PUBLIC int HTLoadStart (HTRequest * request, void * param, int status)
 {      {    
     HTParentAnchor *anchor = HTRequest_anchor(request);      HTParentAnchor * anchor = HTRequest_anchor(request);
     char * addr = HTAnchor_address((HTAnchor *) anchor);      char * addr = HTAnchor_address((HTAnchor *) anchor);
     HTReload mode = HTRequest_reloadMode(request);      HTReload mode = HTRequest_reloadMode(request);
   
Line 213  PUBLIC int HTLoadStart (HTRequest * requ Line 213  PUBLIC int HTLoadStart (HTRequest * requ
         }          }
     } else {      } else {
         HTRequest_addGnHd(request, HT_G_NO_CACHE);        /* No-cache pragma */          HTRequest_addGnHd(request, HT_G_NO_CACHE);        /* No-cache pragma */
         HTAnchor_clearHeader(request->anchor);          HTAnchor_clearHeader(anchor);
     }      }
   
     /*      /*
Line 223  PUBLIC int HTLoadStart (HTRequest * requ Line 223  PUBLIC int HTLoadStart (HTRequest * requ
         HTList *list = HTRule_global();          HTList *list = HTRule_global();
         char * physical = HTRule_translate(list, addr, NO);          char * physical = HTRule_translate(list, addr, NO);
         if (!physical) {          if (!physical) {
             char *url = HTAnchor_address((HTAnchor *) request->anchor);              char *url = HTAnchor_address((HTAnchor *) anchor);
             if (url) {              if (url) {
                 HTUnEscape(url);                  HTUnEscape(url);
                 HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,                  HTRequest_addError(request, ERR_FATAL, NO, HTERR_FORBIDDEN,
Line 256  PUBLIC int HTLoadStart (HTRequest * requ Line 256  PUBLIC int HTLoadStart (HTRequest * requ
             }              }
         } else if ((newaddr = HTProxy_find(addr))) {          } else if ((newaddr = HTProxy_find(addr))) {
             StrAllocCat(newaddr, addr);              StrAllocCat(newaddr, addr);
             request->using_proxy = YES;              HTRequest_setUsingProxy(request, YES);
             HTAnchor_setPhysical(anchor, newaddr);              HTAnchor_setPhysical(anchor, newaddr);
         } else if ((newaddr = HTGateway_find(addr))) {          } else if ((newaddr = HTGateway_find(addr))) {
             char * path = HTParse(addr, "",              char * path = HTParse(addr, "",
Line 267  PUBLIC int HTLoadStart (HTRequest * requ Line 267  PUBLIC int HTLoadStart (HTRequest * requ
             HT_FREE(path);              HT_FREE(path);
             HT_FREE(gatewayed);              HT_FREE(gatewayed);
         } else {          } else {
             request->using_proxy = NO;      /* We don't use proxy or gateway */              HTRequest_setUsingProxy(request, NO);
         }          }
         HT_FREE(newaddr);          HT_FREE(newaddr);
     }      }
Line 282  PUBLIC int HTLoadStart (HTRequest * requ Line 282  PUBLIC int HTLoadStart (HTRequest * requ
 */  */
 PUBLIC int HTLoadTerminate (HTRequest * request, void * param, int status)  PUBLIC int HTLoadTerminate (HTRequest * request, void * param, int status)
 {  {
     char * uri = HTAnchor_address((HTAnchor*)request->anchor);      HTParentAnchor * anchor = HTRequest_anchor(request);
       char * uri = HTAnchor_address((HTAnchor*) anchor);
     switch (status) {      switch (status) {
       case HT_RETRY:        case HT_RETRY:
         if (PROT_TRACE)          if (PROT_TRACE)
Line 294  PUBLIC int HTLoadTerminate (HTRequest * Line 295  PUBLIC int HTLoadTerminate (HTRequest *
         {          {
             HTAlertCallback *cbf = HTAlert_find(HT_A_MESSAGE);              HTAlertCallback *cbf = HTAlert_find(HT_A_MESSAGE);
             if (cbf) (*cbf)(request, HT_A_MESSAGE, HT_MSG_NULL, NULL,              if (cbf) (*cbf)(request, HT_A_MESSAGE, HT_MSG_NULL, NULL,
                             request->error_stack, NULL);                              HTRequest_error(request), NULL);
         }          }
         if (PROT_TRACE)          if (PROT_TRACE)
             HTTrace("Load End.... ERROR: Can't access `%s\'\n",              HTTrace("Load End.... ERROR: Can't access `%s\'\n",

Removed from v.2.15  
changed lines
  Added in v.2.16


Webmaster