Skip to content

Null pointer when CORS maxAge is not specified #2132

@zhaohuabing

Description

@zhaohuabing

goroutine 125 [running]:
github.com/envoyproxy/gateway/internal/xds/translator.patchRouteWithCORSConfig(0xc0001c7680, 0xc00037e780)
/home/ubuntu/gateway/internal/xds/translator/cors.go:129 +0x5a7
github.com/envoyproxy/gateway/internal/xds/translator.patchRouteWithFilters(0xc0001c7680, 0x0?)
/home/ubuntu/gateway/internal/xds/translator/httpfilters.go:133 +0x65
github.com/envoyproxy/gateway/internal/xds/translator.buildXdsRoute(0xc00037e780)
/home/ubuntu/gateway/internal/xds/translator/route.go:80 +0x1085
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).processHTTPListenerXdsTranslation(0xc000e73d80, 0xc001226d60, {0xc0006c2618, 0x1, 0x0?}, 0x0?, 0x2948508?, 0x0)
/home/ubuntu/gateway/internal/xds/translator/translator.go:203 +0xb2c
github.com/envoyproxy/gateway/internal/xds/translator.(*Translator).Translate(0xc000e73d80, 0xc0009c6f80)
/home/ubuntu/gateway/internal/xds/translator/translator.go:67 +0x70
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate.func1({{0xc000f18cc0?, 0x0?}, 0x4d?, 0xc0009c6f80?}, 0x0?)
/home/ubuntu/gateway/internal/xds/translator/runner/runner.go:80 +0x265
github.com/envoyproxy/gateway/internal/message.HandleSubscription[...]({{0x25efe06, 0x2945910?}, {0x25e294d?, 0x0?}}, 0xc00073ac60?, 0xc000e73f98)
/home/ubuntu/gateway/internal/message/watchutil.go:76 +0x47d
github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).subscribeAndTranslate(0xc000b36100, {0x2945910?, 0xc000710cd0?})
/home/ubuntu/gateway/internal/xds/translator/runner/runner.go:52 +0x8d
created by github.com/envoyproxy/gateway/internal/xds/translator/runner.(*Runner).Start
/home/ubuntu/gateway/internal/xds/translator/runner/runner.go:45 +0x272

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions