[16:56] <JoseExposito> Hi! I'm doing a simple GET request to "/api/file_storage/v1/~/Ubuntu%20One" from Qt (using O2 library https://github.com/pipacs/o2) and I'm getting a "Host requires authentication" error. However, when I make the same request to other URLs, like "/api/file_storage/v1/volumes/" or "/api/file_storage/v1/public_files" everything works properly. Does anyone know what could happen?
[16:58] <dobey> karni, beuno: ^^ maybe you know, or who best to ping about that one?
[16:59] <karni> hrm
[17:01] <karni> I would need to relay that to beuno, I don't know the reason. I'm assuming all request are signed (both the working ones and the one that is not working).
[17:06] <beuno> JoseExposito, maybe the %20 isn't being properly handled?
[17:07] <JoseExposito> karni: Yes, both request are signed. Actually to test the request I'm just changing the URL in my source code and all the request are working but the request like"/api/file_storage/v1/~/..." aren't working
[17:08] <dobey> almost certainly the %20
[17:12] <JoseExposito> dobey: Same error without %20 :S
[17:13] <karni> holestly %20 looks fine to me. JoseExposito, you tried with a different path? like creating a synced folder and fetching /~/foo ?
[17:14] <karni> *honestly
[17:14] <karni> JoseExposito: I'm asking because I never talked to the API from Qt
[17:14] <karni> so I'm not familiar with possible issues that may be already known
[17:18] <JoseExposito> karni: Good idea, with my brand new foo volume ithis request is working: https://one.ubuntu.com/api/file_storage/v1/~/foo :D
[17:18] <JoseExposito> probably it is a problem with the %20 (all my volumes had a %20)
[17:18] <JoseExposito> thank you! I'm investigating the problem
[17:19] <karni> JoseExposito: :)
[17:19] <karni> JoseExposito: Might be a problem within the Qt library
[17:20] <karni> or elsewhere, but the API should accept such URL I would say.
[17:27] <JoseExposito> karni: Maybe... Because including "?include_children=true" to the URL causes the same error. The library doesn't look very popular, but it was very easy to deploy in phones... I think that I have to look for a new one...
[17:38] <karni> JoseExposito: oh yes. that should work with no problem. looks like a bug in the lib.
[18:04] <dobey> well, the %20 would be a problem if the signature generation is handling encoded characters wrong
[18:05] <dobey> which is a very common problem with oauth client implementations
[18:24] <JoseExposito> karni, dobey: I have switched to https://github.com/sirikata/liboauthcpp and now it works like a charm. Thank you very much for your help!!
[18:24] <karni> JoseExposito: great! Thanks for letting us know :)
[18:24] <karni> dobey: Yes