| license@php.net so we can mail you a copy immediately. |
+----------------------------------------------------------------------+
| Authors: Rasmus Lerdorf <rasmus@php.net> |
+ | Jani Taskinen <sniper@php.net> |
+----------------------------------------------------------------------+
*/
/* $Id$ */
+
#include <stdio.h>
#include "php.h"
#include "php_open_temporary_file.h"
}
-/*
- * Following code is borrowed from Apache
+/*
+ * Following code is based on apache_multipart_buffer.c from libapreq-0.33 package.
*
*/
return actual_read;
}
+
/* eof if we are out of bytes, or if we hit the final boundary */
static int multipart_buffer_eof(multipart_buffer *self TSRMLS_DC)
{
}
}
+
/* create new multipart_buffer structure */
static multipart_buffer *multipart_buffer_new(char *boundary, int boundary_len)
{
return self;
}
+
/*
gets the next CRLF terminated line from the input buffer.
if it doesn't find a CRLF, and the buffer isn't completely full, returns
return line;
}
+
/* returns the next CRLF terminated line from the client */
static char *get_line(multipart_buffer *self TSRMLS_DC)
{
return ptr;
}
+
/* Free header entry */
static void php_free_hdr_entry(mime_header_entry *h)
{
if(h->value) efree(h->value);
}
+
/* finds a boundary */
static int find_boundary(multipart_buffer *self, char *boundary TSRMLS_DC)
{
return 0;
}
+
/* parse headers */
static int multipart_buffer_headers(multipart_buffer *self, zend_llist *header TSRMLS_DC)
{
return res;
}
+
static char *substring_conf(char *start, int len, char quote)
{
char *result = emalloc(len + 2);
return result;
}
+
static char *php_ap_getword_conf(char **line)
{
char *str = *line, *strend, *res, quote;
return res;
}
+
/*
search for a string in a fixed-length byte string.
if partial is true, partial matches are allowed at the end of the buffer.
return ptr;
}
+
/* read until a boundary condition */
static int multipart_buffer_read(multipart_buffer *self, char *buf, int bytes TSRMLS_DC)
{
return len;
}
+
/*
XXX: this is horrible memory-usage-wise, but we only expect
to do this on small pieces of form data.