Skip to content

Commit

Permalink
Added some debugging, fixed a possible bug with HTTP redirections and…
Browse files Browse the repository at this point in the history
… detecting if gallery_remote2.php is present.
  • Loading branch information
Pierre-Luc Paour committed Nov 4, 2003
1 parent 2a37313 commit d003291
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion com/gallery/GalleryRemote/GalleryComm.java
Expand Up @@ -162,8 +162,10 @@ public static GalleryComm getCommInstance(StatusUpdate su, URL url, Gallery g) {
HTTPConnection.setProxyServer(hostname, port);

if (username != null && username.length() > 0) {
String password = p.getBase64Property(PROXY_PASSWORD);
Log.log(Log.LEVEL_TRACE, MODULE, "Setting proxy auth to " + username + ":" + password);
AuthorizationInfo.addBasicAuthorization(hostname, port, "",
username, p.getBase64Property(PROXY_PASSWORD));
username, password);
}
} else {
HTTPConnection.setProxyServer(null, 0);
Expand Down Expand Up @@ -216,8 +218,11 @@ private static boolean tryComm(StatusUpdate su, HTTPConnection mConnection, Stri
if (rspCode >= 300 && rspCode < 400) {
// retry, the library will have fixed the URL
rsp = mConnection.Post(urlPath);
rspCode = rsp.getStatusCode();
}

Log.log(Log.LEVEL_TRACE, MODULE, "tryComm " + urlPath + ": " + rspCode);

return rspCode == 200;
} catch (UnknownHostException uhe) {
su.error("Unknown host: " + mConnection.getHost());
Expand Down

0 comments on commit d003291

Please sign in to comment.