// no method (an invalid format)
{
+ input.append(" / HTTP/1.0\n", 12);
#if USE_HTTP_VIOLATIONS
// squid custom tolerance consumes initial SP.
Config.onoff.relaxed_header_parser = 1;
#if !USE_HTTP_VIOLATIONS
// a compliant or strict parse, detects as invalid
Config.onoff.relaxed_header_parser = 0;
-#endif
- input.append(" / HTTP/1.0\n", 12);
struct resultSet expectStrict = {
.parsed = false,
.needsMore = false,
.versionEnd = -1,
.version = AnyP::ProtocolVersion()
};
+#else
+ // XXX: for now Squid confuses this with HTTP/0.9
+ struct resultSet expectStrict = {
+ .parsed = true,
+ .needsMore = false,
+ .parserState = Http1::HTTP_PARSE_DONE,
+ .status = Http::scOkay,
+ .msgStart = 0,
+ .msgEnd = (int)input.length()-2,
+ .suffixSz = 0,
+ .methodStart = 0,
+ .methodEnd = 0,
+ .method = HttpRequestMethod(SBuf("/")),
+ .uriStart = 2,
+ .uriEnd = 9,
+ .uri = "HTTP/1.0",
+ .versionStart = -1,
+ .versionEnd = -1,
+ .version = AnyP::ProtocolVersion(AnyP::PROTO_HTTP,0,9)
+ };
+#endif
output.clear();
testResults(__LINE__, input, output, expectStrict);
input.clear();