more cgi processing multiform work.
This commit is contained in:
1 parent
b774e50b59
commit
bd5223ca36
5 files changed
+44
-5
No files matched your search
+20
-1
@@ -1,9 +1,28 @@
|
||||
#include "IMFText.h"
|
||||
#include <unistd.h>
|
||||
|
||||
namespace coreutils {
|
||||
|
||||
IMFText::IMFText(int fd, ZString boundary) : MString() {
|
||||
|
||||
int ch = 0;
|
||||
int rc = 0;
|
||||
char *endcursor;
|
||||
char *index = boundary.getData();
|
||||
|
||||
while(1) {
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch == *index) {
|
||||
++index;
|
||||
ZString check(index, index - endcursor);
|
||||
if(check == boundary) {
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
endcursor = index;
|
||||
}
|
||||
write(ch);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user