Ktor: Ktor Client JS: request to /example requests http://localhost/example

Created on 2 Mar 2020  路  3Comments  路  Source: ktorio/ktor

Ktor Version and Engine Used (client or server and name)
Ktor Client Common 1.3.1, in browser (JS)

Describe the bug
request to /example requests http://localhost/example

To Reproduce
Steps to reproduce the behavior:

  1. Clone https://github.com/Ribesg/Kita/tree/2c7941183ebcde1fc2193bd00a1bed53f1249b10 on a machine which can be reached from the network (a server)
    git clone https://github.com/Ribesg/Kita cd Kita git reset --hard 2c7941183ebcde1fc2193bd00a1bed53f1249b10
  2. Run ./runServer.sh
  3. Browse to https://yourserver:12345
  4. Try to login using whatever credentials (correct ones are admin/admin)
  5. See failing requests to https://localhost/api/auth/login instead of https://yourserver:12345/api/auth/login in the console

Expected behavior
Requests should use the current location.origin when none is provided in the browser

bug

Most helpful comment

Hi @Ribesg, thanks for the report. I'll be fixed in the next minor release

All 3 comments

Hi @Ribesg, thanks for the report. I'll be fixed in the next minor release

For anyone else looking, this bug is still present in 1.3.2. :)

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wellingtoncosta picture wellingtoncosta  路  3Comments

baruchn picture baruchn  路  3Comments

evgfilim1 picture evgfilim1  路  4Comments

PatrickLemke picture PatrickLemke  路  3Comments

SimonSchubert picture SimonSchubert  路  4Comments