Skip to content

[loco-translation-provider] Improper content type of http request #44031

@tomasz-kusy

Description

@tomasz-kusy

Symfony version(s) affected

5.3

Description

When using Loco provider is impossible to send single word "data" as a translation.

Host: localize.biz
Authorization: ****
Accept: */*
User-Agent: Symfony HttpClient/Curl
Accept-Encoding: gzip
Content-Length: 4
Content-Type: application/x-www-form-urlencoded

data

When set Content-Type: text/plain it works.

How to reproduce

Tested with symfony/http-client v5.3.10

Push source asset translation: data

Possible Solution

Workaround:
new CurlHttpClient(['headers' => ['Content-type' => 'text/plain']])

Solution:
Force http client to use 'Content-type' => 'text/plain'

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions