DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUGĀ·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=40620>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED ANDĀ·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=40620





------- Additional Comments From [EMAIL PROTECTED]  2007-02-13 15:12 -------
Still does not help me much with typical test ports like 8080.

Ok, I sat down and wrote such a compare method. I attached a simple class and a
junit test case class to this bug. Here's a sketch of the method
getAuthforURL(.) in AuthManager, be aware that this is coded away without any
testing as I did not have the time to setup the development environment for
JMeter properly:

public Authorization getAuthForURL(URL url) {
        if (!isSupportedProtocol(url)) {
                return null;
        }
        for (PropertyIterator iter = getAuthObjects().iterator(); 
iter.hasNext();) {
                Authorization auth = (Authorization) 
iter.next().getObjectValue();
                URL url2 = new URL(auth.getURL());
                log.debug("Checking match against auth'n entry: " + url2);
                if (URLCompare.isIncluded(url2, url)) {
                        log.debug("Matched, request url '" + url + 
                                        "' matches authorization url '" + url2 
+ "'");
                        return auth;
                }
                log.debug("Did not match");
        }
        log.debug("No authorization url matched request url, authorization 
header not
added");
        return null;
}

The method gets much leaner and more readable in this way.

You can migrate my code into yours in that class. Just add my name in the class
as a co-author or something, if you agree. Of course, the test cases are also
very valuable, they tell what that method is able to do and what not. However
I'm not sure how you would integrate them into the JMeter code base.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to