Changeset: aad275e042b2 for monetdb-java
URL: https://dev.monetdb.org/hg/monetdb-java/rev/aad275e042b2
Modified Files:
        src/main/java/org/monetdb/mcl/net/MapiSocket.java
Branch: monetdbs
Log Message:

Heed followRedirect


diffs (26 lines):

diff --git a/src/main/java/org/monetdb/mcl/net/MapiSocket.java 
b/src/main/java/org/monetdb/mcl/net/MapiSocket.java
--- a/src/main/java/org/monetdb/mcl/net/MapiSocket.java
+++ b/src/main/java/org/monetdb/mcl/net/MapiSocket.java
@@ -112,7 +112,12 @@ public final class MapiSocket {
        /** protocol version of the connection */
        private int version;
 
-       /** Whether we should follow redirects */
+       /** Whether we should follow redirects.
+        * Not sure why this needs to be separate
+        * from 'ttl' but someone someday explicitly documented setTtl
+        * with 'to disable completely, use followRedirects' so
+        * apparently there is a use case.
+        */
        private boolean followRedirects = true;
        /** How many redirections do we follow until we're fed up with it? */
        private int ttl = 10;
@@ -316,7 +321,7 @@ public final class MapiSocket {
                                if (!ok)
                                        close();
                        }
-               } while (attempts++ < this.ttl);
+               } while (followRedirects && attempts++ < this.ttl);
                throw new MCLException("max redirect count exceeded");
        }
 
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to