mirror of
https://github.com/php/php-src.git
synced 2024-11-25 10:54:15 +08:00
0eb1498fa8
* Get Apache to propertly work with POST, and some SAPI fixes
28 lines
672 B
C
28 lines
672 B
C
#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;
|
|
|
|
sapi_module.sapi_error(E_COMPILE_ERROR, "File upload is not yet supported");
|
|
return;
|
|
|
|
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;
|
|
}
|
|
}
|
|
}
|