Skip to content

Commit a430deb

Browse files
committed
BUG/MINOR: fix regex for capture sample
1 parent 5011937 commit a430deb

11 files changed

Lines changed: 190 additions & 170 deletions

File tree

config-parser/tests/configs/haproxy_generated.cfg.go

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/tests/http-request_generated_test.go

Lines changed: 163 additions & 162 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/tests/integration/frontend_data_test.go

Lines changed: 8 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/tests/integration/frontend_test.go

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/tests/tcp-request_generated_test.go

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

config-parser/types/types-other.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ type Action interface {
272272
//test:fail:http-request
273273
//test:fail:http-request capture req.cook_cnt(FirstVisit),bool strlen 10
274274
//test:frontend-ok:http-request capture req.cook_cnt(FirstVisit),bool len 10
275+
//test:frontend-ok:http-request capture str("DNS resolution failure") len 32 unless dns_successful
275276
//test:ok:http-request set-map(map.lst) %[src] %[req.hdr(X-Value)] if value
276277
//test:ok:http-request set-map(map.lst) %[src] %[req.hdr(X-Value)]
277278
//test:fail:http-request set-map(map.lst) %[src]
@@ -950,6 +951,7 @@ type TCPType interface {
950951
//test:ok:tcp-request content reject if !HTTP
951952
//test:ok:tcp-request content capture req.payload(0,6) len 6
952953
//test:ok:tcp-request content capture req.payload(0,6) len 6 if !HTTP
954+
//test:frontend-ok:tcp-request content capture str("DNS resolution failure") len 32 unless dns_successful
953955
//test:ok:tcp-request content do-resolve(txn.myip,mydns,ipv6) capture.req.hdr(0),lower
954956
//test:ok:tcp-request content do-resolve(txn.myip,mydns) capture.req.hdr(0),lower
955957
//test:ok:tcp-request content set-priority-class int(1)

models/http_request_rule.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

models/tcp_request_rule.go

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

specification/build/haproxy_spec.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3695,7 +3695,7 @@ definitions:
36953695
value: capture
36963696
x-display-name: Capture Len
36973697
capture_sample:
3698-
pattern: ^[^\s]+$
3698+
pattern: ^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)
36993699
type: string
37003700
x-dependency:
37013701
type:
@@ -5642,7 +5642,7 @@ definitions:
56425642
- content
56435643
x-display-name: Capture Length
56445644
capture_sample:
5645-
pattern: ^[^\s]+$
5645+
pattern: ^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)
56465646
type: string
56475647
x-dependency:
56485648
action:

specification/models/configuration/http/request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ http_request_rule:
7575
- set-bandwidth-limit
7676
x-nullable: false
7777
capture_sample:
78-
pattern: '^[^\s]+$'
78+
pattern: '^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)'
7979
x-display-name: Capture Sample
8080
type: string
8181
x-dependency:

0 commit comments

Comments
 (0)