Skip to content

Commit

Permalink
BUG/MINOR: fix regex for capture sample
Browse files Browse the repository at this point in the history
  • Loading branch information
amelhusic committed Oct 3, 2024
1 parent 94c0b05 commit 0777122
Show file tree
Hide file tree
Showing 13 changed files with 203 additions and 183 deletions.
6 changes: 6 additions & 0 deletions config-parser/tests/configs/haproxy_generated.cfg.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

337 changes: 169 additions & 168 deletions config-parser/tests/http-request_generated_test.go

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions config-parser/tests/integration/frontend_data_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config-parser/tests/integration/frontend_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions config-parser/tests/tcp-request_generated_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config-parser/types/types-other.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,7 @@ type Action interface {
//test:fail:http-request
//test:fail:http-request capture req.cook_cnt(FirstVisit),bool strlen 10
//test:frontend-ok:http-request capture req.cook_cnt(FirstVisit),bool len 10
//test:frontend-ok:http-request capture str("DNS resolution failure") len 32 unless dns_successful
//test:ok:http-request set-map(map.lst) %[src] %[req.hdr(X-Value)] if value
//test:ok:http-request set-map(map.lst) %[src] %[req.hdr(X-Value)]
//test:fail:http-request set-map(map.lst) %[src]
Expand Down Expand Up @@ -958,6 +959,7 @@ type TCPType interface {
//test:ok:tcp-request content reject if !HTTP
//test:ok:tcp-request content capture req.payload(0,6) len 6
//test:ok:tcp-request content capture req.payload(0,6) len 6 if !HTTP
//test:frontend-ok:tcp-request content capture str("DNS resolution failure") len 32 unless dns_successful
//test:ok:tcp-request content do-resolve(txn.myip,mydns,ipv6) capture.req.hdr(0),lower
//test:ok:tcp-request content do-resolve(txn.myip,mydns) capture.req.hdr(0),lower
//test:ok:tcp-request content set-priority-class int(1)
Expand Down
6 changes: 3 additions & 3 deletions models/http_after_response_rule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions models/http_request_rule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions models/tcp_request_rule.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions specification/build/haproxy_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4386,7 +4386,7 @@ definitions:
value: capture
x-display-name: Capture Len
capture_sample:
pattern: ^[^\s]+$
pattern: ^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)
type: string
x-dependency:
type:
Expand Down Expand Up @@ -5603,7 +5603,7 @@ definitions:
value: capture
x-display-name: Capture Len
capture_sample:
pattern: ^[^\s]+$
pattern: ^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)
type: string
x-dependency:
type:
Expand Down Expand Up @@ -6288,7 +6288,7 @@ definitions:
- content
x-display-name: Capture Length
capture_sample:
pattern: ^[^\s]+$
pattern: ^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)
type: string
x-dependency:
action:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ http_after_response_rule:
- unset-var
x-nullable: false
capture_sample:
pattern: '^[^\s]+$'
pattern: '^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)'
x-display-name: Capture Sample
type: string
x-dependency:
Expand Down
2 changes: 1 addition & 1 deletion specification/models/configuration/http/request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ http_request_rule:
- set-bandwidth-limit
x-nullable: false
capture_sample:
pattern: '^[^\s]+$'
pattern: '^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)'
x-display-name: Capture Sample
type: string
x-dependency:
Expand Down
2 changes: 1 addition & 1 deletion specification/models/configuration/tcp/request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ tcp_request_rule:
value: [connection, content, session]
required: true
capture_sample:
pattern: '^[^\s]+$'
pattern: '^(?:[A-Za-z]+\("([A-Za-z\s]+)"\)|[A-Za-z]+)'
x-display-name: Capture Sample
type: string
x-dependency:
Expand Down

0 comments on commit 0777122

Please sign in to comment.