Skip to content

Why Remove Content-Length in Gateway MVC? #3308

@ghost

Description

Describe the bug
I communicate with downstream server , At beginning I send request with okhttp manutally and everything is ok , when i integrate spring gateway mvc,i got 500 error like form encode escape % etc. after i dive into deep code , i found an odd Request Filter RemoveContentLengthRequestHeadersFilter

why we need remove content-lengh ,i can't understand the meaning of the comment on top.

// jdk http clients seem to not like having this copied from the initial request. // urlconnection fails with form url encoded

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions