Joe Schaefer <[EMAIL PROTECTED]> writes:

> From this, it looks to me like libapreq is parsing the POST data correctly
> (the gif filename showing up as the eps param value is a tell-tale sign that
> the upload was parsed ok).  So the now question is: why isn't $mm->upload()
> detecting that body table entry as being an upload?


I found the bug, thanks eps for helping to track it down!  Here's the 
patch against apreq/trunk (some of the upload-related table callbacks
were emitting the wrong return value, which prematurely terminates the
upload search). 


Index: src/apreq_params.c
===================================================================
--- src/apreq_params.c  (revision 112718)
+++ src/apreq_params.c  (working copy)
@@ -21,9 +21,8 @@
 
 #define MAX_LEN         (1024 * 1024)
 #define MAX_BRIGADE_LEN (1024 * 256)
-#define MAX_FIELDS      (200)
 #define MAX_READ_AHEAD  (1024 * 64)
-    
+
 APREQ_DECLARE(apreq_param_t *) apreq_make_param(apr_pool_t *p, 
                                                 const char *name, 
                                                 const apr_size_t nlen, 
@@ -147,7 +146,7 @@
     apr_array_header_t *arr = data;
     *(apreq_param_t **)apr_array_push(arr) = 
         apreq_value_to_param(apreq_strtoval(val));
-    return 1;
+    return 1;   /* keep going */
 }
 
 
@@ -323,7 +322,7 @@
     apreq_param_t *p = apreq_value_to_param(apreq_strtoval(val));
     if (p->bb)
         apr_table_addn(t, key, val);
-    return 0;
+    return 1;   /* keep going */
 }
 
 
@@ -354,10 +353,10 @@
     apreq_param_t **q = data;
     if (p->bb) {
         *q = p;
-        return 1; /* upload found, stop */
+        return 0; /* upload found, stop */
     }
     else
-        return 0; /* keep searching */
+        return 1; /* keep searching */
 }
 
 

-- 
Joe Schaefer


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html

Reply via email to