Skip to content

Character lost in HTTP post response body. #1166

Closed
@PhyX-Meow

Description

@PhyX-Meow

Versions:

  • Julia 1.11.0-beta1
  • HTTP.jl 1.10.5
  • MbedTLS.jl 1.1.9

I have a HTTP server running locally, but querying the server using HTTP.post give me this:

In [9]: HTTP.post("http://127.0.0.1:5700/get_login_info", ["Content-Type" => "application/json"], body = "{}")
HTTP.Messages.Response:
"""
HTTP/1.1 200 OK
Content-Type: application/json
Server: Microsoft-NetCore/2.0
Date: Thu, 11 Apr 2024 11:54:50 GMT
Content-Length: 113

"status":"ok","retcode":0,"data":{"user_id":3785797225,"nickname":"\u609F\u7406\u80DA\u80CE\u7403"},"echo":null}"""

The response body is missing the first character, in my case, the beginning { in json string is lost.
Correct result should look like this curl result:

❯ curl http://127.0.0.1:5700/get_login_info
{"status":"ok","retcode":0,"data":{"user_id":3785797225,"nickname":"\u609F\u7406\u80DA\u80CE\u7403"},"echo":null}

The issue happens today when I updated julia version.

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