Thanks, I tried but this is what I get:
patch < rfc1867.php-4.4.4.patch
patching file rfc1867.c
Hunk #4 FAILED at 753.
Hunk #5 FAILED at 765.
Hunk #6 succeeded at 792 (offset 1 line).
Hunk #8 succeeded at 828 (offset 1 line).
Hunk #10 FAILED at 917.
Hunk #11 succeeded at 958 (offset 1 line).
Hunk #13 succeeded at 1036 (offset 1 line).
Hunk #15 succeeded at 1092 (offset 1 line).
3 out of 16 hunks FAILED -- saving rejects to file rfc1867.c.rej
patching file rfc1867.h
and in the rfc1867.c.rej
cat rfc1867.c.rej
***************
*** 749,755 ****
XXX: this is horrible memory-usage-wise, but we only expect
to do this on small pieces of form data.
*/
! static char *multipart_buffer_read_body(multipart_buffer *self TSRMLS_DC)
{
char buf[FILLUNIT], *out=NULL;
int total_bytes=0, read_bytes=0;
--- 753,759 ----
XXX: this is horrible memory-usage-wise, but we only expect
to do this on small pieces of form data.
*/
! static char *multipart_buffer_read_body(multipart_buffer *self, unsigned int *len TSRMLS_DC)
{
char buf[FILLUNIT], *out=NULL;
int total_bytes=0, read_bytes=0;
***************
*** 761,766 ****
}
if (out) out[total_bytes] = '\0';
return out;
}
--- 765,771 ----
}
if (out) out[total_bytes] = '\0';
+ *len = total_bytes;
return out;
}
***************
*** 895,907 ****
/* Normal form variable, safe to read all data into memory */
if (!filename && param) {
!
! char *value = multipart_buffer_read_body(mbuff TSRMLS_CC);
if (!value) {
value = estrdup("");
}
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
if (php_mb_encoding_translation(TSRMLS_C)) {
php_mb_gpc_stack_variable(param, value, &val_list, &len_list,
--- 917,941 ----
/* Normal form variable, safe to read all data into memory */
if (!filename && param) {
! unsigned int value_len;
! char *value = multipart_buffer_read_body(mbuff, &value_len TSRMLS_CC);
! unsigned int new_val_len; /* Dummy variable */
if (!value) {
value = estrdup("");
}
+ if (php_rfc1867_callback != NULL) {
+ multipart_event_formdata event_formdata;
+
+ event_formdata.post_bytes_processed = SG(read_post_bytes);
+ event_formdata.name = param;
+ event_formdata.value = &value;
+ event_formdata.length = value_len;
+ event_formdata.newlength = NULL;
+ php_rfc1867_callback(MULTIPART_EVENT_FORMDATA, &event_formdata, &event_extra_data TSRMLS_CC);
+ }
+
#if HAVE_MBSTRING && !defined(COMPILE_DL_MBSTRING)
if (php_mb_encoding_translation(TSRMLS_C)) {
php_mb_gpc_stack_variable(param, value, &val_list, &len_list, |