Hi again,

> Attached you find the logon-page from the requested URL as well as the
> outputs of libhtmlcleaner 2.21 and 2.2. Can you make some sense out of it? I
> don't see significant changes other than
>
> $ diff non-working.html working.html
> <snip>
> 1397c1389
> < <script>/*<![CDATA[*/
> ---
>>
>> <script><![CDATA[
>
> 1401c1393,1394
> < /*]]>*/</script>
> ---
>>
>> ]]></script>
>
> </snip>
> at several places.

This could explain the problem but further investigations are required.

I have a hard time reproducing your problem and it seems that the
logon page you provided is not the one that makes davmail fail. Are
you sure you provided the page that gets referenced in the logs?

While investigating the HTML parsing logic, I came around some
behavior change of htmlcleaner that may explain the failure. If you
know how to recompile debian packages, can you try with the following
patch applied?

--- a/src/java/davmail/exchange/ExchangeSession.java
+++ b/src/java/davmail/exchange/ExchangeSession.java
@@ -507,7 +507,7 @@ public abstract class ExchangeSession {
                     // another failover for script based logon forms
(Exchange 2007)
                     List scriptList =
node.getElementListByName("script", true);
                     for (Object script : scriptList) {
-                        List contents = ((TagNode) script).getChildren();
+                        List contents = ((TagNode) script).getAllChildren();^M
                         for (Object content : contents) {
                             if (content instanceof CommentNode) {
                                 String scriptValue = ((CommentNode)
content).getCommentedContent();

Otherwise, please let me know, I'll build a package for you.

Thanks,

Alex

Reply via email to