We treat http://foo.com and http://foo.com/ the same. That means it does not matter if the URL of a marker will registered with or without a trailing slash. This should avoid to register a marker twice. We than need to follow the http redirection to get the right url of a marker. Now the problem is, that xmlhttprequest follows the redirection by itself but ending in a GET request. Solution is to get the right url by resolving the redirections via HEAD request, return the endpoint url and request the marker on this url. This works but we allways get a "HEAD Method not allowed" message if the server does not support HEAD method on the endpoint url. It does not break the functionality, but it raises some error messages on the server and on the browser console.
We treat http://foo.com and http://foo.com/ the same. That means it does not matter if the URL of a marker will registered with or without a trailing slash. This should avoid to register a marker twice. We than need to follow the http redirection to get the right url of a marker. Now the problem is, that xmlhttprequest follows the redirection by itself but ending in a GET request. Solution is to get the right url by resolving the redirections via HEAD request, return the endpoint url and request the marker on this url. This works but we allways get a "HEAD Method not allowed" message if the server does not support HEAD method on the endpoint url. It does not break the functionality, but it raises some error messages on the server and on the browser console.