Skip to content

When making a form-data request using OkHttp, a status code of 400 is returned. #1736

@ChengduDreamer

Description

@ChengduDreamer

When making a form-data request using OkHttp, a status code of 400 is returned. Here is the captured packet phenomenon.
It seems that when there is a Content-Length field between the boundaries, this situation occurs.
image

However, when I use curl to make a form-data request, it works fine, as shown below.
image

I have debugged cpp-httplib using Visual Studio 2019 breakpoints and found that it may be related to the following code snippet.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions