commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 14643] New: - duplicate code for redirection
Date Mon, 18 Nov 2002 16:53:33 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14643>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=14643

duplicate code for redirection

           Summary: duplicate code for redirection
           Product: Commons
           Version: 2.0 Milestone 1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: joerg.heinicke@gmx.de


Hello,

I have encountered some strange things according following redirects. Since a
few days a log message has been added:
"(HttpMethodBase.java:882) - Redirect requested but followRedirects is disabled"
For me this message is really strange, because every server side redirection
works and I get the expected result at the client. Only the test for the start
page (It's a XUL application and we test server side, whether it's a Mozilla
browser or not.) failed. I found out that this is because of the lost header
information when follow redirects is set to false. So the useragent is reset to
"Jakarta Commons-HttpClient/2.0M1".

For me this seems to be a bit buggy. In HttpMethodBase.processRedirectResponse()
it is asked for getFollowRedirects(), but not at HttpMultiClient.executeMethod():

(starts at line 323)

if (status == HttpStatus.SC_MOVED_PERMANENTLY
    || status == HttpStatus.SC_MOVED_TEMPORARILY
    || status == HttpStatus.SC_SEE_OTHER
    || status == HttpStatus.SC_TEMPORARY_REDIRECT) {

    /* header "location" handling snipped */

    return executeMethod(method);   <<=========
}

executeMethod() is processed recursively.

Can somebody have a look on it? It's not so important, because you can
explicitely set followRedirects to true and everything works ok. But when it's
not set (=> default = false), redirects shell not be followed.

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message