httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gst...@locus.apache.org
Subject cvs commit: apache-2.0/src/modules/dav/main mod_dav.c
Date Thu, 16 Nov 2000 07:13:43 GMT
gstein      00/11/15 23:13:43

  Modified:    src/modules/dav/main mod_dav.c
  Log:
  use apr_size_t and a few minor tweaks
  
  Revision  Changes    Path
  1.30      +12 -7     apache-2.0/src/modules/dav/main/mod_dav.c
  
  Index: mod_dav.c
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/modules/dav/main/mod_dav.c,v
  retrieving revision 1.29
  retrieving revision 1.30
  diff -u -r1.29 -r1.30
  --- mod_dav.c	2000/11/15 02:05:12	1.29
  +++ mod_dav.c	2000/11/16 07:13:43	1.30
  @@ -2716,7 +2716,6 @@
       const dav_hooks_vsn *vsn_hooks = DAV_GET_HOOKS_VSN(r);
       dav_error *err;
       ap_xml_doc *doc;
  -    ap_xml_elem *child;
       const char *target = NULL;
       int result;
   
  @@ -2739,6 +2738,9 @@
       /* note: doc == NULL if no request body */
   
       if (doc != NULL) {
  +        const ap_xml_elem *child;
  +        apr_size_t tsize;
  +
           if (!dav_validate_root(doc, "version-control")) {
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r,
   		          "The request body does not contain "
  @@ -2762,8 +2764,9 @@
           }
   
           /* get version URI */
  -        ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL, &target, NULL);
  -        if (strlen(target) == 0) {
  +        ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL,
  +                       &target, &tsize);
  +        if (tsize == 0) {
   	    ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r,
   		          "An \"href\" element does not contain a URI.");
   	    return HTTP_BAD_REQUEST;
  @@ -3146,7 +3149,7 @@
       ap_xml_elem *child;
       int depth;
       int result;
  -    int tsize;
  +    apr_size_t tsize;
       dav_error *err;
       dav_set_target_walker_ctx ctx = { { 0 } };
       dav_response *multi_status;
  @@ -3206,7 +3209,8 @@
       }
   
       /* get the target value (a label or a version URI */
  -    ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL, &ctx.target, &tsize);
  +    ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL,
  +                   &ctx.target, &tsize);
       if (tsize == 0) {
   	ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r,
   		      "A \"label-name\" or \"href\" element does not contain "
  @@ -3326,7 +3330,7 @@
       ap_xml_elem *child;
       int depth;
       int result;
  -    int tsize;
  +    apr_size_t tsize;
       dav_error *err;
       dav_label_walker_ctx ctx = { { 0 } };
       dav_response *multi_status;
  @@ -3389,7 +3393,8 @@
   	return HTTP_BAD_REQUEST;
       }
   
  -    ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL, &ctx.label, &tsize);
  +    ap_xml_to_text(r->pool, child, AP_XML_X2T_INNER, NULL, NULL,
  +                   &ctx.label, &tsize);
       if (tsize == 0) {
   	ap_log_rerror(APLOG_MARK, APLOG_ERR | APLOG_NOERRNO, 0, r,
   		      "A \"label-name\" element does not contain "
  
  
  

Mime
View raw message