static int HTPRegisterPatternsForProtocolDetection(void)
{
/* toserver */
+
+ /* GET */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"GET|20|", 4, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* PUT */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"PUT|20|", 4, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* POST */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"POST|20|", 5, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* HEAD */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"HEAD|20|", 5, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* TRACE */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"TRACE|20|", 6, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* OPTIONS */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"OPTIONS|20|", 8, 0, STREAM_TOSERVER) < 0)
{
{
return -1;
}
+
+ /* CONNECT */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"CONNECT|20|", 8, 0, STREAM_TOSERVER) < 0)
{
return -1;
}
+ /* DELETE */
+ if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
+ "DELETE|20|", 7, 0, STREAM_TOSERVER) < 0)
+ {
+ return -1;
+ }
+ if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
+ "DELETE|09|", 7, 0, STREAM_TOSERVER) < 0)
+ {
+ return -1;
+ }
+
+ /* PATCH */
+ if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
+ "PATCH|20|", 6, 0, STREAM_TOSERVER) < 0)
+ {
+ return -1;
+ }
+ if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
+ "PATCH|09|", 6, 0, STREAM_TOSERVER) < 0)
+ {
+ return -1;
+ }
+
/* toclient */
if (AppLayerProtoDetectPMRegisterPatternCS(IPPROTO_TCP, ALPROTO_HTTP,
"HTTP/0.9", 8, 0, STREAM_TOCLIENT) < 0)