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

Missing trailing slash on "extra addressbook" causes wrong URL to be requested #477

Open
tlansdell8 opened this issue Feb 11, 2025 · 1 comment

Comments

@tlansdell8
Copy link

Hi there,

Great addon thank you very much. I have just uncovered what may or may not be a bug;

I have an address book called "contacts" under .../addressbooks/users//contacts/ which was defined in my config.php as an extra_addressbook ".../addressbooks/users/%l/contacts". I could not add any contacts to it as I was getting a 405 on the put requests and couldn't work out why.
Turns out, according to the logs, the PUT request was being made to .../addressbooks/users/%l/ completely missing the /contacts part of the URL which obviously the server was not happy with.
When I changed the config.php entry to have a trailing slash, the request was made to ../addressbooks/users/%l/contacts/ which was then accepted.

Have I just uncovered a feature that everyone already knew about?
Thanks :)

@mstilkerich
Copy link
Owner

Hi, yes that's certainly a bug, thanks for reporting. Typically URLs for collections have a trailing slash, but I am not aware of a requirement for this. I'll look into it when I find some time.

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

2 participants