Diff for /Amaya/amaya/query.c between versions 1.165 and 1.166

version 1.165, 1999/01/07 13:34:42 version 1.166, 1999/01/08 14:31:34
Line 653  int                 status; Line 653  int                 status;
      }       }
   
    /*     /*
       ** Only do redirect on GET and HEAD     ** Only do redirect on GET and HEAD
     */      */
    if (!HTMethod_isSafe (method))     if (!HTMethod_isSafe (method))
      {       {
Line 686  int                 status; Line 686  int                 status;
     **  allows us in an easy way to keep track of the number of redirections      **  allows us in an easy way to keep track of the number of redirections
     **  so that we can detect endless loops.      **  so that we can detect endless loops.
     */      */
      
    if (HTRequest_doRetry (request))     if (HTRequest_doRetry (request))
      {       {
         /* do we need to normalize the URL? */         /* only do a redirect using a network protocol understood by Amaya */
         if (strncmp (new_anchor->parent->address, "http:", 5))          if (IsValidProtocol (new_anchor->parent->address))
           {            {
              /* Yes, so we use the pre-redirection anchor as a base name */              /* if it's a valid URL, we try to normalize it */
                /* We use the pre-redirection anchor as a base name */
              ref = AmayaParseUrl (new_anchor->parent->address,                ref = AmayaParseUrl (new_anchor->parent->address, 
                                   me->urlName, AMAYA_PARSE_ALL);                                    me->urlName, AMAYA_PARSE_ALL);
              if (ref)               if (ref)
Line 704  int                 status; Line 705  int                 status;
                  TtaFreeMemory (ref);                   TtaFreeMemory (ref);
                }                 }
              else               else
                return HT_ERROR; /* We can't redirect anymore */                 return HT_OK; /* We can't redirect anymore */
           }            }
           else
             return HT_OK; /* We can't redirect anymore */
   
         /* update the current file name */          /* update the current file name */
         if ((me->mode & AMAYA_ASYNC) || (me->mode & AMAYA_IASYNC))           if ((me->mode & AMAYA_ASYNC) || (me->mode & AMAYA_IASYNC)) 

Removed from v.1.165  
changed lines
  Added in v.1.166


Webmaster