significant work on cookies and cgi formdata variables.

This commit is contained in:
Brad Arant committed 2025-03-18 16:46:20 -07:00
1 parent bd5223ca36
commit 9cd8381845
6 files changed
+37 -62

No files matched your search

+9 -10
View File
@@ -4,21 +4,20 @@
namespace coreutils {
IMFText::IMFText(int fd, ZString boundary) : MString() {
int ch = 0;
char ch = 0;
int rc = 0;
char *endcursor;
char *index = boundary.getData();
boundary.reset();
int blen = boundary.getLength() + 1;
while(1) {
rc = ::read(fd, &ch, 1);
if(ch == *index) {
++index;
ZString check(index, index - endcursor);
if(check == boundary) {
rc = ::read(fd, &ch, 1);
if(boundary.nextChar() == ch) {
if(boundary.eod()) {
length -= blen;
break;
}
} else {
endcursor = index;
} else {
boundary.reset();
}
write(ch);
}