Skip to content

multipart/form-data windows-1251 #1194

Open
@UncleVic

Description

@UncleVic

I have a problem with decoding messages in the charset windows-1251.
If a form contains charset=windows-1251, data can't be decoded correctly. After parsing a request a string will be corrupted.

My payload, for example. The tag <ErrorText> contains the charset windows-1251

POST /api/v1/events/providers/ipay HTTP/1.1
X-Forwarded-Proto: https
Connection: close
Content-Length: 673
Content-Type: multipart/form-data; charset=windows-1251; boundary=BS_20230321154848
User-Agent: BS_SOU_749

--BS_20230321154848
Content-Disposition: form-data; name="XML"

<?xml version="1.0" encoding="windows-1251" ?>
<ServiceProvider_Request>
  <DateTime>20230321154848</DateTime>
  <Version>1</Version>
  <RequestType>TransactionResult</RequestType>
  <ServiceNo>1</ServiceNo>
  <PersonalAccount>2gzD17a7MHFpnQGZmGag75</PersonalAccount>
  <Currency>933</Currency>
  <RequestId>6888</RequestId>
  <TransactionResult>
    <TransactionId>356624</TransactionId>
    <ServiceProvider_TrxId>2gzD17a7MHFpnQGZmGag75</ServiceProvider_TrxId>
    <CardTerminal>888888</CardTerminal>
    <ErrorText>Îïåðàöèÿ îòìåíåíà</ErrorText>
  </TransactionResult>
</ServiceProvider_Request>
--BS_20230321154848--

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