GNOME Bugzilla – Bug 664116
"Fetch URL" doesn't always work
Last modified: 2011-12-01 09:55:30 UTC
For cases where email domain doesn't match server's host name the fetch URL and whole autodiscover doesn't work. What is usually done when user enters user@email.com is that the autodiscover gets email.com and tries to construct the autodiscover URL from it, but, for example, mine server doesn't use email.com, but server.com there. Since the EWS prefills the Host URL, I suggest to use that host name instead, and if that fails then check with email.com domain name.
Created attachment 201452 [details] [review] proposed ews patch for evolution-ews; This may do it, same as cover the case where user name is not the same as an email.
Thanks for the patch, I can confirm it solves the issue for me.
Review of attachment 201452 [details] [review]: ::: src/server/e-ews-connection.c @@ +1266,3 @@ + url1 = g_strdup_printf ("https://%s/autodiscover/autodiscover.xml", domain); + url2 = g_strdup_printf ("https://autodiscover.%s/autodiscover/autodiscover.xml", domain); + } This fails to work if I use the pre-filled uri (where server is exchange.com) and my actual server was the domain part of the email id. It would be nice if you can change the code to execute both cases if the first case fails. And return back the error if both cases fail.
Created attachment 201981 [details] [review] proposed ews patch ][ for evolution-ews; Is this working better? It invokes 4 requests in parallel, instead of two.
Since you are already on it, for the particular case of my company, the autodiscover only works if http is used instead of https. Do you think I should ask our sysadmin to change that or is something that EWS should support? Thanks.
Hmm, interesting idea. When you click the fetch URL button then both Host URL and OAB URL are populated with received values, thus what about using the protocol from the Host URL as filled before you click the Fetch URL button? It might not be that obvious, especially when it's prefilled with https now, but I believe it's better than doing 8 requests in parallel.
If you create a patch for that I can give it a try using my setup. Right now I hardcoded the protocol to http to make it work.
Created attachment 202078 [details] [review] proposed ews patch ]I[ for evolution-ews; Updated patch, to use autodiscover method based on the method from Host URL. Might not be that great, though, because imagine your private information is transferred over the network insecurely. We can move back to patch ][ if needed, there is no other change than this one in this patch.
Comment on attachment 202078 [details] [review] proposed ews patch ]I[ Looks good. Better to pick-up the protocol from the uri. Since https:// is set as the default, I hope the user would be aware of what he is doing while changing it. Please commit the patch.
Created commit 68a53eb in ews master (3.3.3+)