throw new EOFException(sm.getString("iib.eof.error"));
}
- if (buf[pos] == Constants.SP) {
+ // Spec says single SP but it also says be tolerant of HT
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
request.method().setBytes(buf, start, pos - start);
}
}
+ // Spec says single SP but also says be tolerant of multiple and/or HT
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill())
+ throw new EOFException(sm.getString("iib.eof.error"));
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
// Mark the current buffer position
start = pos;
int end = 0;
// Reading the URI
//
- space = false;
boolean eol = false;
while (!space) {
throw new EOFException(sm.getString("iib.eof.error"));
}
- if (buf[pos] == Constants.SP) {
+ // Spec says single SP but it also says be tolerant of HT
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
end = pos;
} else if ((buf[pos] == Constants.CR)
request.requestURI().setBytes(buf, start, end - start);
}
+ // Spec says single SP but also says be tolerant of multiple and/or HT
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill())
+ throw new EOFException(sm.getString("iib.eof.error"));
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
+
// Mark the current buffer position
start = pos;
end = 0;
throw new EOFException(sm.getString("iib.eof.error"));
}
- if (buf[pos] == Constants.SP) {
+ // Spec says single SP but it also says be tolerant of HT
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
request.method().setBytes(buf, start, pos - start);
}
}
+
+ // Spec says single SP but also says be tolerant of multiple and/or HT
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill())
+ throw new EOFException(sm.getString("iib.eof.error"));
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
// Mark the current buffer position
start = pos;
int end = 0;
// Reading the URI
//
- space = false;
boolean eol = false;
while (!space) {
throw new EOFException(sm.getString("iib.eof.error"));
}
- if (buf[pos] == Constants.SP) {
+ // Spec says single SP but it also says be tolerant of HT
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
end = pos;
} else if ((buf[pos] == Constants.CR)
request.requestURI().setBytes(buf, start, end - start);
}
+ // Spec says single SP but also says be tolerant of multiple and/or HT
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill())
+ throw new EOFException(sm.getString("iib.eof.error"));
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
// Mark the current buffer position
start = pos;
end = 0;
if (!fill(true, false)) //request line parsing
return false;
}
- if (buf[pos] == Constants.SP) {
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
request.method().setBytes(buf, parsingRequestLineStart, pos - parsingRequestLineStart);
}
parsingRequestLinePhase = 3;
}
if ( parsingRequestLinePhase == 3 ) {
+ // Spec says single SP but also be tolerant of multiple and/or HT
+ boolean space = true;
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill(true, false)) //request line parsing
+ return false;
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
// Mark the current buffer position
int end = 0;
//
// Reading the URI
//
- boolean space = false;
while (!space) {
// Read new bytes if needed
if (pos >= lastValid) {
if (!fill(true,false)) //request line parsing
return false;
}
- if (buf[pos] == Constants.SP) {
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
space = true;
end = pos;
} else if ((buf[pos] == Constants.CR)
parsingRequestLinePhase = 4;
}
if ( parsingRequestLinePhase == 4 ) {
+ // Spec says single SP but also be tolerant of multiple and/or HT
+ boolean space = true;
+ while (space) {
+ // Read new bytes if needed
+ if (pos >= lastValid) {
+ if (!fill(true, false)) //request line parsing
+ return false;
+ }
+ if (buf[pos] == Constants.SP || buf[pos] == Constants.HT) {
+ pos++;
+ } else {
+ space = false;
+ }
+ }
+
// Mark the current buffer position
end = 0;