Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
PCRE2 (PHP >=7.3)

/
^[\w\d\/\.\-\+]+(?:\s?;?(\s+)?((?:boundary|charset)\s?=\s?['\"\w\d\.\-]+)?;?(\s+)?)?(?:\s?(?:gzip|deflate|br|,)+\s?;?(\s+)?)?$
/
gm

Description

Some applications send incorrect HEADERS:Content-Type. If it needs to pass the checks (for example, on WAF) this regex maybe used

Submitted by anonymous - 2 years ago