Package org.asynchttpclient

Examples of org.asynchttpclient.MaxRedirectException


            Request request,//
            int statusCode) throws Exception {

        if (followRedirect(config, request) && REDIRECT_STATUSES.contains(statusCode)) {
            if (future.incrementAndGetCurrentRedirectCount() >= config.getMaxRedirects()) {
                throw new MaxRedirectException("Maximum redirect reached: " + config.getMaxRedirects());

            } else {
                // We must allow 401 handling again.
                future.getAndSetAuth(false);
View Full Code Here


                    context.setStatusHandler(RedirectHandler.INSTANCE);
                }
                context.getRedirectCount().incrementAndGet();
                if (redirectCountExceeded(context)) {
                    httpHeader.setSkipRemainder(true);
                    context.abort(new MaxRedirectException());
                }
            } else {
                if (context.getRedirectCount().get() > 0) {
                    context.getRedirectCount().set(0);
                }
View Full Code Here

TOP

Related Classes of org.asynchttpclient.MaxRedirectException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.