Documentation
¶
Overview ¶
Package pcre writes a route's pattern, which the reader checks with Go's regexp and Envoy runs with RE2, as PCRE2 reads it in the byte mode nginx compiles its regular expressions in: from Go's own parse of the pattern, so PCRE2 is never handed RE2 text it reads another way ({,3}, { 2 } and \v are text or other characters in RE2 and repetitions or vertical space in PCRE2, and \Q with no \E would quote the text written after the pattern).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Write ¶
Write returns PCRE2 text that takes exactly the paths of ASCII characters the pattern takes, the only paths Envoy matches a pattern against: Envoy refuses a byte above 0x7F in an HTTP/1.1 path and escapes it in an HTTP/2 one, and matches the path with every such escape kept (measured on Envoy 1.40.2). A character outside ASCII written in the pattern therefore matches nothing, and a class takes a byte above 0x7F only when it takes every character outside ASCII, as [^/] and . do; nginx meets such a byte only decoded from an escape, the difference its declaration names. Its error is an operation of Go's parse this writer does not know: a bug in proxyfile, because the reader has compiled the same pattern.
Types ¶
This section is empty.