Hi AFCS team,
I just tried out the java script for external authentication. By default, when calling new AFCS.AccountManager(accountURL);, I'll get an error like the following:
"GET http://connectnow.acrobat.com/myaccount?mode=xml&accountonly=true&; failed with status 302";
Actually this url will be redirected to "https://na2.connectnow.acrobat.com/myaccount?mode=xml&accountonly=true&" for me.
However, the script handles the http response only when status=200, or it consider the status as error.
So I added following code to http_get()/http_post(), everything goes well so far.
if (responseCode == 200) {
......
return connection.getInputStream();
}
// handle the redirect status
else if (responseCode == 302) {
return http_get(connection.getHeaderField("Location"), headers);
}
else {
throw new Error();
}
Is it something need to be fixed in next release?
Thanks!
Jinni
Solved! Go to Solution.
Views
Replies
Total Likes
This has been fixed for the next version of the SDK. Thanks!
Views
Replies
Total Likes
So, the code was there a couple of releases ago, and then I took it out because I noticed that the lower level API were already processing redirections (but at this point I don't know on which case)
I'll do some more testing and if needed add the code back. Thanks for pointing it out!
Views
Replies
Total Likes
I got this error too and spent about an hour trying to figure it out before checking the forums. Jinni's code fixed it. Thanks! It would be really helpful if that code was back in the release.
Views
Replies
Total Likes
This has been fixed for the next version of the SDK. Thanks!
Views
Replies
Total Likes
Great! I'm very glad to see the it's been fixed~.
Thanks!
Jinni
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies