Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with sending multipart/form-data request, server returns 520 error code #110

Open
2 of 6 tasks
alex1998dmit opened this issue Jan 18, 2024 · 1 comment
Open
2 of 6 tasks

Comments

@alex1998dmit
Copy link

alex1998dmit commented Jan 18, 2024

Issue type

  • bug report
  • idea
  • question
  • other

Expected behavior

При использовании qorsproxy и при отправке запроса multipart/form-data с екслелем запрос проксируется без ошибок

Actual behavior

При использовании qorsproxy и при отправке запроса multipart/form-data с екслелем запрос проксируется с 520 ошибкой
Ответ запроса:

{
    "message": "Unreachable dest: https://......"
}

При смене версии на 2.4.19 ошибка 520 исчезает, но возникает 400 ошибка. Такой же запрос из приложения с таким же файлом проходит успешно, что наводит на мысли что парсинг меняет содержимое запроса, либо проставляет неправильные заголовки

  • I've read the docs. This case is not mentioned
  • Similar issue does not exist

Steps to reproduce

Запустить qorsproxy со следующей конфигурацией:

{
  "server": {
    "host": "127.0.0.1",
    "port": 8080
  },
  "rules": {
    "localhost": {
      "from": [
        "*"
      ],
      "to": [
        "kassa-test.qiwi.com",
        "kassa.dev.qiwi.tools",
        "kassa-payout-api.testing.qiwi.com"
      ],
      "interceptions": [
        {
          "req": {
            "method": "OPTIONS"
          },
          "res": {
            "status": 200
          }
        }
      ],
      "mutations": [
        {
          "direction": "to",
          "headers": [
            {
              "name": "host",
              "value": null
            },
            {
              "name": "origin",
              "value": "http://localhost"
            }
          ]
        },
        {
          "direction": "from",
          "headers": [
            {
              "name": "transfer-encoding",
              "value": null
            }
          ]
        },
        {
          "direction": "from",
          "headers": [
            {
              "name": "set-cookie",
              "value": {
                "from": "/;Domain.+;/i",
                "to": ";Domain: localhost;"
              }
            }
          ]
        }
      ]
    }
  }
}

Дернуть запрос через qorsproxy с передачей файла
POST: http://localhost:8080/
BODY:
file: (binary)

antongolub added a commit that referenced this issue Jan 18, 2024
@alex1998dmit
Copy link
Author

Добавил репозиторий с повтором ошибки - https://github.com/alex1998dmit/qorsy-problem

antongolub added a commit that referenced this issue Jan 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant