Diff for /Amaya/amaya/query.c between versions 1.205 and 1.206

version 1.205, 1999/10/08 13:09:58 version 1.206, 1999/10/08 15:33:33
Line 482  AHTReqContext      *me; Line 482  AHTReqContext      *me;
            if (me->outputfile)             if (me->outputfile)
              TtaFreeMemory (me->outputfile);               TtaFreeMemory (me->outputfile);
          }           }
          
          /* @@ temp change for the %esc conversion */
          if (me->method == METHOD_PUT && me->urlName)
            TtaFreeMemory (me->urlName);
   
        if (me->content_type)         if (me->content_type)
          TtaFreeMemory (me->content_type);           TtaFreeMemory (me->content_type);
                 
Line 650  int                 status; Line 654  int                 status;
    AHTReqContext      *me = HTRequest_context (request);     AHTReqContext      *me = HTRequest_context (request);
    HTMethod            method = HTRequest_method (request);     HTMethod            method = HTRequest_method (request);
    STRING              ref;     STRING              ref;
      STRING              escape_src, dst;
    char               *tmp;     char               *tmp;
   
    if (!me)     if (!me)
Line 709  int                 status; Line 714  int                 status;
         if (IsValidProtocol (ISO2WideChar (new_anchor->parent->address)))          if (IsValidProtocol (ISO2WideChar (new_anchor->parent->address)))
           {            {
             /* if it's a valid URL, we try to normalize it */              /* if it's a valid URL, we try to normalize it */
              /* We use the pre-redirection anchor as a base name */              /* We use the pre-redirection anchor as a base name */
              ref = AmayaParseUrl (ISO2WideChar (new_anchor->parent->address),               dst = ISO2WideChar (new_anchor->parent->address);
                                   ISO2WideChar (me->urlName), AMAYA_PARSE_ALL);              escape_src = EscapeURL (ISO2WideChar (me->urlName));
               if (escape_src)
                 {
                   ref = AmayaParseUrl (dst, escape_src, AMAYA_PARSE_ALL);
                   TtaFreeMemory (escape_src);
                 }
               else
                 ref = NULL;
   
              if (ref)               if (ref)
                {                 {
                  HT_FREE (new_anchor->parent->address);                   HT_FREE (new_anchor->parent->address);
Line 727  int                 status; Line 740  int                 status;
           return HT_OK; /* We can't redirect anymore */            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)
               || (me->method == METHOD_PUT)) 
           {            {
             TtaFreeMemory (me->urlName);              TtaFreeMemory (me->urlName);
             me->urlName = WideChar2ISO (TtaStrdup (ISO2WideChar (new_anchor->parent->address)));              me->urlName = WideChar2ISO (TtaStrdup (ISO2WideChar (new_anchor->parent->address)));
Line 2523  STRING        content_type; Line 2538  STRING        content_type;
 {  {
    AHTReqContext      *me;     AHTReqContext      *me;
    STRING              ref;     STRING              ref;
      STRING              esc_url;
    int                 status, l;     int                 status, l;
    int                 tempsubdir;     int                 tempsubdir;
    ThotBool            bool_tmp;     ThotBool            bool_tmp;
Line 2577  STRING        content_type; Line 2593  STRING        content_type;
    object_counter++;     object_counter++;
         
    /* normalize the URL */     /* normalize the URL */
    ref = AmayaParseUrl (urlName, _EMPTYSTR_, AMAYA_PARSE_ALL);     esc_url = EscapeURL (urlName);
      if (esc_url) 
        {
          ref = AmayaParseUrl (esc_url, _EMPTYSTR_, AMAYA_PARSE_ALL);
          TtaFreeMemory (esc_url);
        }
      else
        ref = NULL;
   
    /* should we abort the request if we could not normalize the url? */     /* should we abort the request if we could not normalize the url? */
    if (ref == NULL || ref[0] == EOS) {     if (ref == NULL || ref[0] == EOS) {
       /*error */        /*error */
Line 2824  void               *context_tcbf; Line 2848  void               *context_tcbf;
    char               *etag = NULL;     char               *etag = NULL;
    HTParentAnchor     *dest_anc_parent;     HTParentAnchor     *dest_anc_parent;
    STRING              tmp;     STRING              tmp;
      STRING              esc_url;
    int                 UsePreconditions;     int                 UsePreconditions;
    ThotBool            lost_update_check = TRUE;     ThotBool            lost_update_check = TRUE;
   
Line 2892  void               *context_tcbf; Line 2917  void               *context_tcbf;
    me->context_icbf = (void *) NULL;     me->context_icbf = (void *) NULL;
    me->terminate_cbf = terminate_cbf;     me->terminate_cbf = terminate_cbf;
    me->context_tcbf = context_tcbf;     me->context_tcbf = context_tcbf;
    me->urlName = WideChar2ISO (urlName);     esc_url = EscapeURL (urlName);
      me->urlName = TtaStrdup (WideChar2ISO (esc_url));
      TtaFreeMemory (esc_url);
    me->block_size =  file_stat.st_size;     me->block_size =  file_stat.st_size;
    /* select the parameters that distinguish a PUT from a GET/POST */     /* select the parameters that distinguish a PUT from a GET/POST */
    me->method = METHOD_PUT;     me->method = METHOD_PUT;
Line 2911  void               *context_tcbf; Line 2938  void               *context_tcbf;
 #endif /* _WINDOWS */  #endif /* _WINDOWS */
    me->source = HTAnchor_findAddress (fileURL);     me->source = HTAnchor_findAddress (fileURL);
    HT_FREE (fileURL);     HT_FREE (fileURL);
    me->dest = HTAnchor_findAddress (WideChar2ISO (urlName));     me->dest = HTAnchor_findAddress (me->urlName);
    /* we memorize the anchor's parent @ as we use it a number of times     /* we memorize the anchor's parent @ as we use it a number of times
       in the following lines */        in the following lines */
    dest_anc_parent = HTAnchor_parent (me->dest);     dest_anc_parent = HTAnchor_parent (me->dest);

Removed from v.1.205  
changed lines
  Added in v.1.206


Webmaster