This repository was archived by the owner on May 27, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 605
Add HTTP header well known type and C++ UUID #297
Merged
Merged
Changes from 27 commits
Commits
Show all changes
31 commits
Select commit
Hold shift + click to select a range
ef10942
add HTTP header well known type and C++ UUID
asraa 3f0ef08
update validate.pb.go
asraa 0ada956
simplify conditions
asraa b538b97
fix java build
asraa 183e106
bad test
asraa cfaec72
java
asraa c9f0f24
check for slashes in hdr name
asraa a8bdbfb
add more testcases
asraa 084d9ab
empty
asraa 61dad58
define regex for http header name/value
asraa 52baf9e
make patterns in to well known regex
asraa cb4812e
fix bazel
asraa 9bc951e
fix bazel maven_jar defn
asraa 70b715f
Merge remote-tracking branch 'upstream/master' into header-valid
asraa d311924
Merge remote-tracking branch 'upstream/master' into header-valid
asraa a7e22e9
remove fixes for build
asraa 5dba63d
fix merge mistake
asraa 4675686
encode in utf-8 when writing out
asraa b2d81f7
Merge remote-tracking branch 'upstream/master' into header-valid
asraa 94d5d8d
cleanup
asraa a41290c
remove unused regex definitions
asraa b43d32e
add backtick
asraa 87e9ca4
simplify header value regex as blacklist
asraa a7debef
fixup to match entire string + also fixup dependency
asraa 5a47460
python regex
asraa bbc4c85
remove pyc
asraa 7995cbb
Merge remote-tracking branch 'upstream/master' into header-valid
asraa 1093391
there's gotta be another way
asraa 6bd356b
Merge remote-tracking branch 'upstream/master' into header-valid
asraa 0b11e92
remove autosaved pgs
asraa 78ca604
Merge branch 'master' into header-valid
akonradi File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like these regular expressions are duplicated here and in the Python code. Is it possible to unify those so we can have a single source of truth?
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The python code doesn't go through the go code checkers, but possibly I could have a const file with these regexes that python parses? Or is there a way that i can define constants in a protobuf file (
validate.proto)? I think default values aren't in proto3 and that's probably an issueThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think defining these in a separate file is heading towards the right solution, but instead of a .proto file it can be a textproto or YAML file that we check in. The contents would be of a new message type that is basically just
map<KnownRegex, string>and contains the single canonical definition of the regex for each well-known regex. Then we can refer to that during Go/C++/Java code generation and include it in the Python code (not completely clear on how, but it should be possible).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be too much for this PR, though. Up to you whether you want to do that here; if not, please open another issue to track cleaning up the tech debt.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, interesting. I like the textproto. It would make sense to include uuid patterns / other regexes that are duped (although the uuid dupe might be able to removed in code).
I filed an issue #316 and I'm happy to work on next week (after I use this PR in envoy!)