illdefined / cloudlog-adifwatch

Automatic upload of ADIF log to CloudLog
Other
12 stars 1 forks source link

Getting 405 from cloudlog using default /api/qso path after recent change #2

Closed garrettben closed 2 years ago

garrettben commented 2 years ago

It looks like cloudlog-adifwatch is now appending appending /api/qso directly to the URL in the command arg, which seems to be breaking for me. My previous successful API uploads were going to /index.php/api/qso without it having to be explicitly configured in the command to do so. I was able to get the old behavior and get rid of the 405 by appending /index.php/ to the url in my command. I'm not sure if this is intended.

Here are the before/after logs from apache2:

Before upgrade: cloudlog.XXXXXXX.net:80 192.168.X.X - - [24/Oct/2021:16:50:00 +0000] "PUT /index.php/api/qso HTTP/1.1" 201 624 "-" "cloudlog-adifwatch/0.0 (+https://github.com/illdefined/cloudlog-adifwatch)"

After upgrade: cloudlog.XXXXXXX.net:80 192.168.X.X - - [24/Oct/2021:22:16:13 +0000] "PUT /api/qso HTTP/1.1" 405 506 "-" "cloudlog-adifwatch/0.0 (+https://github.com/illdefined/cloudlog-adifwatch)"

After workaround: cloudlog.XXXXXXX.net:80 192.168.X.X - - [24/Oct/2021:23:11:28 +0000] "PUT /index.php/api/qso HTTP/1.1" 201 624 "-" "cloudlog-adifwatch/0.0 (+https://github.com/illdefined/cloudlog-adifwatch)"

illdefined commented 2 years ago

I’ll look into it.

illdefined commented 2 years ago

The API URL has always been constructed by appending /api/qso to the URL.

Until commit 9563e79 there was a bug where any path component would be stripped: Base URL https://fernschreibstelle.de/index.php would yield https://fernschreibstelle.de/api/qso instead of https://fernschreibstelle.de/index.php/api/qso.

After that there have been no changes on how the API URL is constructed.

If it did work before, I suppose that something on the server side may have changed. Are you using any rewrite or redirect rules in your Apache configuration?

garrettben commented 2 years ago

Not using any rewrite rules or redirects in the apache2 or haproxy config, and the only thing that changed in the interim was reinstalling cloudlog-adifwatch. If this is the expected behavior, I'm fine with leaving the explicit /index.php/ in the url string. I just thought I'd point it out in case it was undesired. I'll re-check my configs, and if I find anything, I'll update this thread.

illdefined commented 2 years ago

I’ll close this issue for now. Feel free to re‐open it, if you learn anything new.