Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support the new protocol node format: #29

Merged
merged 1 commit into from
Jul 17, 2020

Conversation

bneradt
Copy link
Collaborator

@bneradt bneradt commented Jul 9, 2020

"sessions": [
    {
        "protocol": [
            {
                "name": "http",
                "version": "2"
            },
            {
                "name": "tls",
                "version": "TLSv1.2",
                "sni": "www.tls.com",
                "proxy-verify-mode": 0,
                "proxy-provided-cert": true
            },
            {
                "name": "tcp"
            },
            {
                "name": "ip",
                "version": "4"
            }
        ],

...

                "proxy-request": {
                    "protocol": [
                        {
                            "name": "http",
                            "version": "1.1"
                        },
                        {
                            "name": "tls",
                            "version": "TLSv1.2",
                            "sni": "www.tls.com",
                            "proxy-verify-mode": 1,
                            "proxy-provided-cert": false
                        },
                        {
                            "name": "tcp"
                        },
                        {
                            "name": "ip",
                            "version": "4"
                        }
                    ],

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@bneradt bneradt mentioned this pull request Jul 9, 2020
@SolidWallOfCode
Copy link
Member

Do you really want a list instead of a map? I think it's fundamental that none of the protocol stack tags will be duplicated. E.g.

"protocol": {
  "http" : {
    "version": "1.1"
  },
  "tls": {
    "version": "TLSv1.2",
    "sni": "delain.nl"
...

@bneradt
Copy link
Collaborator Author

bneradt commented Jul 9, 2020

Do you really want a list instead of a map? I think it's fundamental that none of the protocol stack tags will be duplicated. E.g.

"protocol": {
  "http" : {
    "version": "1.1"
  },
  "tls": {
    "version": "TLSv1.2",
    "sni": "delain.nl"
...

Keeping it a sequence was Masakazu's influence:
apache/trafficserver#6972

You can see the discussion there. He had some good observations that convinced me that maintaining it as a sequence made sense. Since it is a protocol stack, order matters and technically order is not preserved in a map.

    "sessions": [
        {
            "protocol": [
                {
                    "name": "http",
                    "version": "2"
                },
                {
                    "name": "tls",
                    "version": "TLSv1.2",
                    "sni": "www.tls.com",
                    "proxy-verify-mode": 0,
                    "proxy-provided-cert": true
                },
                {
                    "name": "tcp"
                },
                {
                    "name": "ip",
                    "version": "4"
                }
            ],

...

                    "proxy-request": {
                        "protocol": [
                            {
                                "name": "http",
                                "version": "1.1"
                            },
                            {
                                "name": "tls",
                                "version": "TLSv1.2",
                                "sni": "www.tls.com",
                                "proxy-verify-mode": 1,
                                "proxy-provided-cert": false
                            },
                            {
                                "name": "tcp"
                            },
                            {
                                "name": "ip",
                                "version": "4"
                            }
                        ],
@bneradt bneradt force-pushed the handle_protocol_array branch from 386b6fc to a97d02a Compare July 17, 2020 03:06
@bneradt bneradt merged commit 4fc61af into yahoo:master Jul 17, 2020
@bneradt bneradt deleted the handle_protocol_array branch July 17, 2020 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants