significant work on cookies and cgi formdata variables.
This commit is contained in:
1 parent
bd5223ca36
commit
9cd8381845
6 files changed
+37
-62
No files matched your search
+12
-18
@@ -8,32 +8,26 @@ namespace coreutils {
|
||||
|
||||
IMFHeaderField::IMFHeaderField(char &ch, int fd) {
|
||||
int rc = 0;
|
||||
|
||||
std::cout << "050" << std::endl;
|
||||
|
||||
if((ch >= 'A') && (ch <= 'Z'))
|
||||
key.write(ch);
|
||||
|
||||
while(ch != ':') {
|
||||
while(((ch >= 'A') && (ch <= 'Z')) ||
|
||||
((ch >= 'a') && (ch <= 'z')) ||
|
||||
((ch >= '0') && (ch <= '9')) ||
|
||||
(ch == '-') || (ch == '_')) {
|
||||
key.write(ch);
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch != ':')
|
||||
key.write(ch);
|
||||
}
|
||||
|
||||
std::cout << "051: " << key << std::endl;
|
||||
|
||||
if(ch != ':')
|
||||
throw coreutils::Exception("expecting ':' in data stream.");
|
||||
rc = ::read(fd, &ch, 1);
|
||||
while(ch == ' ')
|
||||
rc = ::read(fd, &ch, 1);
|
||||
|
||||
rc = ::read(fd, &ch, 1);
|
||||
while(ch != '\r') {
|
||||
value.write(ch);
|
||||
rc = ::read(fd, &ch, 1);
|
||||
if(ch != '\r')
|
||||
value.write(ch);
|
||||
}
|
||||
std::cout << "052: " << value << std::endl;
|
||||
rc = ::read(fd, &ch, 1);
|
||||
std::cout << "053" << std::endl;
|
||||
if(ch != '\n')
|
||||
throw coreutils::Exception("expecting '\n' in data stream.");
|
||||
rc = ::read(fd, &ch, 1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user