1999-05-26 06:28:24 +08:00
|
|
|
#include "rfc1867.h"
|
|
|
|
|
|
|
|
SAPI_POST_READER_FUNC(rfc1867_post_reader)
|
|
|
|
{
|
|
|
|
char *boundary;
|
|
|
|
uint boundary_len;
|
|
|
|
char input_buffer[FILE_UPLOAD_INPUT_BUFFER_SIZE];
|
|
|
|
uint read_bytes;
|
|
|
|
|
1999-05-29 06:41:48 +08:00
|
|
|
sapi_module.sapi_error(E_COMPILE_ERROR, "File upload is not yet supported");
|
|
|
|
return;
|
|
|
|
|
1999-05-26 06:28:24 +08:00
|
|
|
boundary = strstr(content_type_dup, "boundary");
|
|
|
|
if (!boundary || !(boundary=strchr(boundary, '='))) {
|
|
|
|
sapi_module.sapi_error(E_COMPILE_ERROR, "Missing boundary in multipart/form-data POST data");
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
boundary++;
|
|
|
|
boundary_len = strlen(boundary);
|
|
|
|
|
|
|
|
for (;;) {
|
|
|
|
read_bytes = sapi_module.read_post(input_buffer, FILE_UPLOAD_INPUT_BUFFER_SIZE-100 SLS_CC);
|
|
|
|
if (read_bytes<=0) {
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|