@ -522,6 +524,70 @@ int DetectPcreParseTest07 (void) {
DetectPcreFree(pd);
returnresult;
}
staticintDetectPcreTestSig01Real(intmpm_type){
uint8_t*buf=(uint8_t*)
"GET /one/ HTTP/1.1\r\n"
"Host: one.example.org\r\n"
"\r\n\r\n"
"GET /two/ HTTP/1.1\r\n"
"Host: two.example.org\r\n"
"\r\n\r\n";
uint16_tbuflen=strlen((char*)buf);
Packetp;
ThreadVarsth_v;
DetectEngineThreadCtx*det_ctx;
intresult=0;
memset(&th_v,0,sizeof(th_v));
memset(&p,0,sizeof(p));
p.src.family=AF_INET;
p.dst.family=AF_INET;
p.payload=buf;
p.payload_len=buflen;
p.proto=IPPROTO_TCP;
DetectEngineCtx*de_ctx=DetectEngineCtxInit();
if(de_ctx==NULL){
gotoend;
}
de_ctx->flags|=DE_QUIET;
de_ctx->sig_list=SigInit(de_ctx,"alert tcp any any -> any any (msg:\"HTTP TEST\"; pcre:\"^/gEt/i\"; pcre:\"/\\/two\\//U; pcre:\"/GET \\/two\\//\"; pcre:\"/\\s+HTTP/R\"; sid:1;)");
de_ctx->sig_list=SigInit(de_ctx,"alert tcp any any -> any any (msg:\"HTTP TEST\"; pcre:\"^/gEt/i\"; pcre:\"/\\/two\\//U; pcre:\"/GET \\/two\\//\"; pcre:\"/\\s+HTTP/R\"; sid:1;)");