Skip to content

Sending empty cookie header #8

Description

@DebanKsahu

Describe the bug

        if (request.cookies.isNotEmpty()) {
            builder.header(HttpHeaders.Cookie, request.cookies.filter { it.enabled }
                .joinToString(separator = "; ") { cookie ->
                    "${cookie.key}=${VariableResolver.resolve(cookie.value, variableLayers)}"
                })
        }

In the above code you can see that it first check is the cookies list, then search for enabled cookies but if all cookies are disabled then it will send an empty cookie header.

Expected behavior
It should not send any cookie header if no cookie if enabled.

Environment (please complete the following information):

  • OS: Windows 11
  • Java: 21
  • App version / commit SHA: 1.16.0
  • Module/area: core-network
  • Run mode: None

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions