httpd-apreq-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject svn commit: r155725 - in httpd/apreq/branches/multi-env-unstable: ./ glue/perl/xsbuilder/ glue/perl/xsbuilder/APR/Request/Apache2/ glue/perl/xsbuilder/APR/Request/CGI/ glue/perl/xsbuilder/APR/Request/Cookie/ glue/perl/xsbuilder/APR/Request/Param/ include/ library/ library/t/ module/
Date Tue, 01 Mar 2005 01:20:18 GMT
Author: joes
Date: Mon Feb 28 17:20:13 2005
New Revision: 155725

URL: http://svn.apache.org/viewcvs?view=rev&rev=155725
Log:
  Replace v->size with v->nlen + v->dlen.
  Added supporting apreq_value_table_add().

Modified:
    httpd/apreq/branches/multi-env-unstable/CHANGES
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/APR__Request__CGI.h
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Param/Param.xs
    httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_postperl.h
    httpd/apreq/branches/multi-env-unstable/include/apreq.h
    httpd/apreq/branches/multi-env-unstable/include/apreq_cookie.h
    httpd/apreq/branches/multi-env-unstable/include/apreq_param.h
    httpd/apreq/branches/multi-env-unstable/library/cookie.c
    httpd/apreq/branches/multi-env-unstable/library/param.c
    httpd/apreq/branches/multi-env-unstable/library/parser_header.c
    httpd/apreq/branches/multi-env-unstable/library/parser_urlencoded.c
    httpd/apreq/branches/multi-env-unstable/library/t/params.c
    httpd/apreq/branches/multi-env-unstable/library/util.c
    httpd/apreq/branches/multi-env-unstable/module/test_cgi.c

Modified: httpd/apreq/branches/multi-env-unstable/CHANGES
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/CHANGES?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/CHANGES (original)
+++ httpd/apreq/branches/multi-env-unstable/CHANGES Mon Feb 28 17:20:13 2005
@@ -5,11 +5,8 @@
 @section v2_05_dev Changes with libapreq2-2.05-dev
 
 - C API [joes]
-  Change v->size semantics: now it represents the total
-  amount of memory appended to the apreq_value_t struct.
-  Added supporting apreq_param_nlen(), apreq_param_vlen(), 
-  apreq_param_size(), apreq_cookie_nlen(), apreq_cookie_vlen(), 
-  apreq_cookie_size(), apreq_value_table_add().
+  Replace v->size with v->nlen + v->dlen.
+  Added supporting apreq_value_table_add().
 
 - C API [joes]
   Remove apreq_cookie_attr().

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h
(original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Apache2/APR__Request__Apache2.h
Mon Feb 28 17:20:13 2005
@@ -82,7 +82,7 @@
     dTHXa(d->perl);
     dSP;
     apreq_param_t *p = apreq_value_to_param(val);
-    SV *sv = newSVpvn(key, apreq_param_nlen(p));
+    SV *sv = newSVpvn(key, p->v.nlen);
     if (apreq_param_is_tainted(p))
         SvTAINTED_on(sv);
 

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/APR__Request__CGI.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/APR__Request__CGI.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/APR__Request__CGI.h
(original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/CGI/APR__Request__CGI.h
Mon Feb 28 17:20:13 2005
@@ -79,7 +79,7 @@
     dTHXa(d->perl);
     dSP;
     apreq_param_t *p = apreq_value_to_param(val);
-    SV *sv = newSVpvn(key, apreq_param_nlen(p));
+    SV *sv = newSVpvn(key, p->v.nlen);
     if (apreq_param_is_tainted(p))
         SvTAINTED_on(sv);
 

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
(original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Cookie/Cookie.xs
Mon Feb 28 17:20:13 2005
@@ -7,7 +7,7 @@
     dTHXa(d->perl);
     dSP;
     apreq_cookie_t *c = apreq_value_to_cookie(val);
-    SV *sv = newSVpv(key, 0);
+    SV *sv = newSVpvn(key, c->v.nlen);
     if (apreq_cookie_is_tainted(c))
         SvTAINTED_on(sv);
    
@@ -217,7 +217,7 @@
     /*nada*/
 
   CODE:
-    RETVAL = newSVpvn(obj->v.data, apreq_cookie_vlen(obj));
+    RETVAL = newSVpvn(obj->v.data, obj->v.dlen);
     if (apreq_cookie_is_tainted(obj))
         SvTAINTED_on(RETVAL);
 
@@ -247,7 +247,7 @@
     APR::Request::Cookie obj
 
   CODE:
-    RETVAL = newSVpvn(obj->v.name, apreq_cookie_nlen(obj));
+    RETVAL = newSVpvn(obj->v.name, obj->v.nlen);
     if (apreq_cookie_is_tainted(obj))
         SvTAINTED_on(RETVAL);
 

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Param/Param.xs
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Param/Param.xs?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Param/Param.xs
(original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/APR/Request/Param/Param.xs
Mon Feb 28 17:20:13 2005
@@ -7,7 +7,7 @@
     dTHXa(d->perl);
     dSP;
     apreq_param_t *p = apreq_value_to_param(val);
-    SV *sv = newSVpvn(key, apreq_param_nlen(p));
+    SV *sv = newSVpvn(key, p->v.nlen);
     if (apreq_param_is_tainted(p))
         SvTAINTED_on(sv);
 
@@ -296,7 +296,7 @@
     /*nada*/
 
   CODE:
-    RETVAL = newSVpvn(obj->v.data, apreq_param_vlen(obj));
+    RETVAL = newSVpvn(obj->v.data, obj->v.dlen);
     if (apreq_param_is_tainted(obj))
         SvTAINTED_on(RETVAL);
 
@@ -326,7 +326,7 @@
     APR::Request::Param obj
 
   CODE:
-    RETVAL = newSVpvn(obj->v.name, apreq_param_nlen(obj));
+    RETVAL = newSVpvn(obj->v.name, obj->v.nlen);
     if (apreq_param_is_tainted(obj))
         SvTAINTED_on(RETVAL);
 

Modified: httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_postperl.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_postperl.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_postperl.h (original)
+++ httpd/apreq/branches/multi-env-unstable/glue/perl/xsbuilder/apreq_xs_postperl.h Mon Feb
28 17:20:13 2005
@@ -142,7 +142,7 @@
                               const char *class, SV *parent)
 {
     if (class == NULL) {
-        SV *rv = newSVpvn(p->v.data, apreq_param_vlen(p));
+        SV *rv = newSVpvn(p->v.data, p->v.dlen);
         if (apreq_param_is_tainted(p))
             SvTAINTED_on(rv);
         /*XXX add charset fixups */
@@ -157,7 +157,7 @@
                               const char *class, SV *parent)
 {
     if (class == NULL) {
-        SV *rv = newSVpvn(c->v.data, apreq_cookie_vlen(c));
+        SV *rv = newSVpvn(c->v.data, c->v.dlen);
         if (apreq_cookie_is_tainted(c))
             SvTAINTED_on(rv);
         /*XXX add charset fixups? */

Modified: httpd/apreq/branches/multi-env-unstable/include/apreq.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/include/apreq.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/include/apreq.h (original)
+++ httpd/apreq/branches/multi-env-unstable/include/apreq.h Mon Feb 28 17:20:13 2005
@@ -92,15 +92,13 @@
 /** @brief libapreq's pre-extensible string type */
 typedef struct apreq_value_t {
     char             *name;    /**< value name */
-    apr_size_t        size;    /**< total size (nlen + dlen + 1) */
+    apr_size_t        nlen;    /**< length of name */
+    apr_size_t        dlen;    /**< length of data */
     char              data[1]; /**< value data  */
 } apreq_value_t;
 
 static APR_INLINE
 void apreq_value_table_add(const apreq_value_t *v, apr_table_t *t) {
-#ifdef APREQ_DEBUG
-    assert(v->size == (v->name - v->data) + strlen(v->name));
-#endif
     apr_table_addn(t, v->name, v->data);
 }
 

Modified: httpd/apreq/branches/multi-env-unstable/include/apreq_cookie.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/include/apreq_cookie.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/include/apreq_cookie.h (original)
+++ httpd/apreq/branches/multi-env-unstable/include/apreq_cookie.h Mon Feb 28 17:20:13 2005
@@ -74,17 +74,6 @@
            apreq_attr_to_type(apreq_value_t, data, deconst.out));
 }
 
-static APR_INLINE
-apr_size_t apreq_cookie_nlen(const apreq_cookie_t *c) {
-    return c->v.size - (c->v.name - c->v.data);
-}
-
-static APR_INLINE
-apr_size_t apreq_cookie_vlen(const apreq_cookie_t *c) {
-    return (c->v.name - c->v.data) - 1;
-}
-
-
 /**@return 1 if this is an RFC cookie, 0 if its a Netscape cookie. */
 static APR_INLINE
 unsigned apreq_cookie_version(const apreq_cookie_t *c) {

Modified: httpd/apreq/branches/multi-env-unstable/include/apreq_param.h
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/include/apreq_param.h?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/include/apreq_param.h (original)
+++ httpd/apreq/branches/multi-env-unstable/include/apreq_param.h Mon Feb 28 17:20:13 2005
@@ -40,16 +40,6 @@
     const apreq_value_t  v;      /**< underlying name/value info */
 } apreq_param_t;
 
-static APR_INLINE
-apr_size_t apreq_param_nlen(const apreq_param_t *p) {
-    return p->v.size - (p->v.name - p->v.data);
-}
-
-static APR_INLINE
-apr_size_t apreq_param_vlen(const apreq_param_t *p) {
-    return (p->v.name - p->v.data) - 1;
-}
-
 APREQ_DECLARE(apr_size_t)apreq_param_size(const apreq_param_t *p);
 
 

Modified: httpd/apreq/branches/multi-env-unstable/library/cookie.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/cookie.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/cookie.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/cookie.c Mon Feb 28 17:20:13 2005
@@ -42,8 +42,7 @@
     if (c->commentURL != NULL)
         alen += strlen(c->commentURL);
 
-    return (apr_size_t)alen + c->v.size + sizeof *c;
-
+    return (apr_size_t)alen + c->v.nlen + c->v.dlen;
 }
  
 APREQ_DECLARE(void) apreq_cookie_expires(apreq_cookie_t *c, 
@@ -157,17 +156,16 @@
         return NULL;
 
     *(const apreq_value_t **)&v = &c->v;
-    v->size = nlen + vlen + 1;
 
     if (vlen > 0 && value != NULL)
         memcpy(v->data, value, vlen);
     v->data[vlen] = 0;
-
+    v->dlen = vlen;
     v->name = v->data + vlen + 1;
     if (name != NULL)
         memcpy (v->name, name, nlen);
     v->name[nlen] = 0;
-
+    v->nlen = nlen;
     /* session cookie is the default */
     c->max_age = -1;
 

Modified: httpd/apreq/branches/multi-env-unstable/library/param.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/param.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/param.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/param.c Mon Feb 28 17:20:13 2005
@@ -44,16 +44,17 @@
     param->flags = 0; 
 
     *(const apreq_value_t **)&v = &param->v;
-    v->size = vlen + nlen + 1;
 
     if (vlen && val != NULL)
         memcpy(v->data, val, vlen);
     v->data[vlen] = 0;
+    v->dlen = vlen;
 
     v->name = v->data + vlen + 1;
     if (nlen && name != NULL)
         memcpy(v->name, name, nlen);
     v->name[nlen] = 0;
+    v->nlen = nlen;
 
     return param;
 }
@@ -75,7 +76,7 @@
     if (p->upload != NULL)
         apr_brigade_length(p->upload, 0, &blen);
 
-    return (apr_size_t)blen + tlen + p->v.size + sizeof *p;
+    return (apr_size_t)blen + tlen + p->v.nlen + p->v.dlen;
 
 }
 
@@ -117,7 +118,8 @@
         *param = NULL;
         return status;
     }
-    v->size = nlen + vlen + 1;
+    v->nlen = nlen;
+    v->dlen = vlen;
     *param = p;
 
     return APR_SUCCESS;
@@ -127,16 +129,12 @@
 APREQ_DECLARE(char *) apreq_param_encode(apr_pool_t *pool,
                                          const apreq_param_t *param)
 {
-    apr_size_t dlen, nlen, vlen;
+    apr_size_t dlen;
     char *data;
-
-    nlen = apreq_param_nlen(param);
-    vlen = apreq_param_vlen(param);
-
-    data = apr_palloc(pool, 3 * (nlen + vlen) + 2);
-    dlen = apreq_encode(data, param->v.name, nlen);
+    data = apr_palloc(pool, 3 * (param->v.nlen + param->v.dlen) + 2);
+    dlen = apreq_encode(data, param->v.name, param->v.nlen);
     data[dlen++] = '=';
-    dlen += apreq_encode(data + dlen, param->v.data, vlen);
+    dlen += apreq_encode(data + dlen, param->v.data, param->v.dlen);
 
     return data;
 }

Modified: httpd/apreq/branches/multi-env-unstable/library/parser_header.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/parser_header.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/parser_header.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/parser_header.c Mon Feb 28 17:20:13 2005
@@ -126,6 +126,7 @@
         --dest;
 
     dest[-1] = 0;
+    v->dlen = (dest - v->data) - 1;
 
     /* write name */
     v->name = dest;
@@ -137,7 +138,7 @@
         ++iov;
     }
     *dest = 0;
-    v->size = dest - v->data;
+    nlen = dest - v->name;
 
     while ((f = APR_BRIGADE_FIRST(bb)) != e)
         apr_bucket_delete(f);

Modified: httpd/apreq/branches/multi-env-unstable/library/parser_urlencoded.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/parser_urlencoded.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/parser_urlencoded.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/parser_urlencoded.c Mon Feb 28 17:20:13
2005
@@ -119,12 +119,13 @@
         return s;
 
     v->name = v->data + vlen + 1;
+    v->dlen = vlen;
 
     s = apreq_decodev(v->name, &nlen, (struct iovec *)arr.elts, mark);
     if (s != APR_SUCCESS)
         return s;
 
-    v->size = nlen + vlen + 1;
+    v->nlen = nlen;
 
     while ((f = APR_BRIGADE_FIRST(bb)) != e)
         apr_bucket_delete(f);

Modified: httpd/apreq/branches/multi-env-unstable/library/t/params.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/t/params.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/t/params.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/t/params.c Mon Feb 28 17:20:13 2005
@@ -49,7 +49,7 @@
     val = apr_table_get(args,"quux");
     AT_str_eq(val, "foo bar");
     param = apreq_value_to_param(val);
-    AT_int_eq(apreq_param_vlen(param), 7);
+    AT_int_eq(param->v.dlen, 7);
 
     AT_str_eq(apr_table_get(args,"plus"), "+");
     AT_str_eq(apr_table_get(args,"uplus"), "+");
@@ -146,7 +146,7 @@
  
     param = apreq_param_make(p, name, nlen, val, vlen);
     AT_str_eq(param->v.name, name);
-    AT_int_eq(apreq_param_vlen(param), vlen);
+    AT_int_eq(param->v.dlen, vlen);
     AT_str_eq(param->v.data, val);
 
     encode = apreq_param_encode(p, param);
@@ -155,7 +155,7 @@
     s = apreq_param_decode(&decode, p, encode, nlen, vlen+2);
     AT_int_eq(s, APR_SUCCESS);
     AT_str_eq(decode->v.name, name);
-    AT_int_eq(apreq_param_vlen(decode), vlen);
+    AT_int_eq(decode->v.dlen, vlen);
     AT_str_eq(decode->v.data, val);
 }
 

Modified: httpd/apreq/branches/multi-env-unstable/library/util.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/library/util.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/library/util.c (original)
+++ httpd/apreq/branches/multi-env-unstable/library/util.c Mon Feb 28 17:20:13 2005
@@ -392,10 +392,6 @@
     return d - dest;
 }
 
-
-#define apreq_value_nlen(v) (v->size - (v->name - v->data))
-#define apreq_value_vlen(v) ((v->name - v->data) - 1)
-
 APREQ_DECLARE(char *) apreq_join(apr_pool_t *p, 
                                  const char *sep, 
                                  const apr_array_header_t *arr,
@@ -414,7 +410,7 @@
         return NULL;
 
     for (j=0, len=0; j < n; ++j)
-        len += apreq_value_vlen(a[j]) + slen;
+        len += a[j]->dlen + slen + 1;
 
     /* Allocated the required space */
 
@@ -442,17 +438,17 @@
     switch (mode) {
 
     case APREQ_JOIN_ENCODE:
-        d += apreq_encode(d, a[0]->data, apreq_value_vlen(a[0]));
+        d += apreq_encode(d, a[0]->data, a[0]->dlen);
 
         for (j = 1; j < n; ++j) {
                 memcpy(d, sep, slen);
                 d += slen;
-                d += apreq_encode(d, a[j]->data, apreq_value_vlen(a[j]));
+                d += apreq_encode(d, a[j]->data, a[j]->dlen);
         }
         break;
 
     case APREQ_JOIN_DECODE:
-        if (apreq_decode(d, &len, a[0]->data, apreq_value_vlen(a[0])))
+        if (apreq_decode(d, &len, a[0]->data, a[0]->dlen))
             return NULL;
         else
             d += len;
@@ -461,7 +457,7 @@
             memcpy(d, sep, slen);
             d += slen;
 
-            if (apreq_decode(d, &len, a[j]->data, apreq_value_vlen(a[j])))
+            if (apreq_decode(d, &len, a[j]->data, a[j]->dlen))
                 return NULL;
             else
                 d += len;
@@ -471,25 +467,25 @@
 
     case APREQ_JOIN_QUOTE:
 
-        d += apreq_quote_once(d, a[0]->data, apreq_value_vlen(a[0]));
+        d += apreq_quote_once(d, a[0]->data, a[0]->dlen);
 
         for (j = 1; j < n; ++j) {
             memcpy(d, sep, slen);
             d += slen;
-            d += apreq_quote_once(d, a[j]->data, apreq_value_vlen(a[j]));
+            d += apreq_quote_once(d, a[j]->data, a[j]->dlen);
         }
         break;
 
 
     case APREQ_JOIN_AS_IS:
-        memcpy(d,a[0]->data,apreq_value_vlen(a[0]));
-        d += apreq_value_vlen(a[0]);
+        memcpy(d,a[0]->data, a[0]->dlen);
+        d += a[0]->dlen;
 
         for (j = 1; j < n ; ++j) {
             memcpy(d, sep, slen);
             d += slen;
-            memcpy(d, a[j]->data, apreq_value_vlen(a[j]));
-            d += apreq_value_vlen(a[j]);
+            memcpy(d, a[j]->data, a[j]->dlen);
+            d += a[j]->dlen;
         }
         break;
 

Modified: httpd/apreq/branches/multi-env-unstable/module/test_cgi.c
URL: http://svn.apache.org/viewcvs/httpd/apreq/branches/multi-env-unstable/module/test_cgi.c?view=diff&r1=155724&r2=155725
==============================================================================
--- httpd/apreq/branches/multi-env-unstable/module/test_cgi.c (original)
+++ httpd/apreq/branches/multi-env-unstable/module/test_cgi.c Mon Feb 28 17:20:13 2005
@@ -104,9 +104,9 @@
         }
 
         apr_file_printf(out, "%s", "Content-Type: text/plain\n\n");
-        dest = apr_pcalloc(pool, cookie->v.size + 1);
+        dest = apr_pcalloc(pool, cookie->v.dlen + 1);
         if (apreq_decode(dest, &dlen, cookie->v.data, 
-                         apreq_cookie_vlen(cookie)) == APR_SUCCESS)
+                         cookie->v.dlen) == APR_SUCCESS)
             apr_file_printf(out, "%s", dest);
         else {
 //            apreq_log(APREQ_ERROR APR_EGENERAL, env,



Mime
View raw message