Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2.0
    • Fix Version/s: 2.3.0
    • Labels:
      None
    • Environment:
      Tested on Windows xp Pro and Netware 6.5SP@ with Java 1.4.2_04

      Description

      Cannot read messages posted by some NNTP clients.

      For example, if a message is posted with Mozilla Firefox .72 or Groupwise client 6.5 and someone tries to read them, the client just hands and times out. Messages posted with Outlook express work perfectly fine.

      This is only an issue if there is a message body. If the message consist of only the subject, then it doesn't seem to cause any problems.

        Activity

        Hide
        ramazz Rodney Crossman added a comment -

        I meant Netwaer 6.5 Service pack 2... fat fingers

        Show
        ramazz Rodney Crossman added a comment - I meant Netwaer 6.5 Service pack 2... fat fingers
        Hide
        lpg Louis-Philippe Gagnon added a comment -

        I think we've hit the same problem, some ethereal debugging yields some info that might be helpful to somebody (sorry, no resources here to help out):

        <pasting>

        The NNTP protocol appears to use the sequence \r\n.\r\n to signal end-of-message. Using ethereal, we've determined that for the problem messages, the server is neglecting the leading \r\n (thus the period appears to be part of the message, and the client waits for a terminating sequence that never comes).

        </pasting>

        In our case, all the problem messages have come from Thunderbird 0.7.2 and 0.7.3

        Show
        lpg Louis-Philippe Gagnon added a comment - I think we've hit the same problem, some ethereal debugging yields some info that might be helpful to somebody (sorry, no resources here to help out): <pasting> The NNTP protocol appears to use the sequence \r\n.\r\n to signal end-of-message. Using ethereal, we've determined that for the problem messages, the server is neglecting the leading \r\n (thus the period appears to be part of the message, and the client waits for a terminating sequence that never comes). </pasting> In our case, all the problem messages have come from Thunderbird 0.7.2 and 0.7.3
        Hide
        lpg Louis-Philippe Gagnon added a comment -

        Some more investigating: it looks like thunderbird is not emitting a \r\n at the end of the message, while other clients (mozilla 1.5 in my tests) are. So the end of a thunderbird message is just \r\n.\r\n
        while the end of a mozilla message ends with \r\n\r\n.\r\n

        (line-ending for last line of the message, followed by the end-of-message marker. actually, in all my tests the end-of-message marker is being sent as a separate packet.)

        I don't know whether it's legal for Thunderbird not to emit a newline at the end of its messages, but it's surely wrong for the server to misbehave as a result.

        Note that manually adding newlines at the end of thunderbird messages makes the problem go away. Unfortunately, this doesn't help when attachments are involved.

        Show
        lpg Louis-Philippe Gagnon added a comment - Some more investigating: it looks like thunderbird is not emitting a \r\n at the end of the message, while other clients (mozilla 1.5 in my tests) are. So the end of a thunderbird message is just \r\n.\r\n while the end of a mozilla message ends with \r\n\r\n.\r\n (line-ending for last line of the message, followed by the end-of-message marker. actually, in all my tests the end-of-message marker is being sent as a separate packet.) I don't know whether it's legal for Thunderbird not to emit a newline at the end of its messages, but it's surely wrong for the server to misbehave as a result. Note that manually adding newlines at the end of thunderbird messages makes the problem go away. Unfortunately, this doesn't help when attachments are involved.
        Hide
        chemi Jose M. Ordax added a comment -

        I have seen exactly the same problem with Mozilla 1.7.3 too. If I send the note with several CRLF at the end, then it works fine.

        Regards,

        Chemi.

        Show
        chemi Jose M. Ordax added a comment - I have seen exactly the same problem with Mozilla 1.7.3 too. If I send the note with several CRLF at the end, then it works fine. Regards, Chemi.
        Hide
        chemi Jose M. Ordax added a comment -

        This is curious. I have found another Bug Repository with the same bug and a provisional patch. ¿?¿?

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

        Show
        chemi Jose M. Ordax added a comment - This is curious. I have found another Bug Repository with the same bug and a provisional patch. ¿?¿? FYI: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25027
        Hide
        chemi Jose M. Ordax added a comment -

        Well, I commented this bug in the users distribution list and Daniel Perry commented a possible fix: <<change lines 1056 and 1192 of class NNTPHandler from writeLoggedFlushedResponse("."); to writeLoggedFlushedResponse("\r\n.");>>

        I have rebuilt James 2.2.1 with this fix and the tests with Mozilla 1.7.3 and my own Java Client (using Jakarta Commons Net) have worked successfully.

        Show
        chemi Jose M. Ordax added a comment - Well, I commented this bug in the users distribution list and Daniel Perry commented a possible fix: <<change lines 1056 and 1192 of class NNTPHandler from writeLoggedFlushedResponse("."); to writeLoggedFlushedResponse("\r\n.");>> I have rebuilt James 2.2.1 with this fix and the tests with Mozilla 1.7.3 and my own Java Client (using Jakarta Commons Net) have worked successfully.
        Hide
        pezzer Daniel Perry added a comment -

        Patch to fix this and make james rcf compliant with respect to messages not ending with \r\n.

        — NNTPHandler_orig.java
        +++ NNTPHandler.java
        @@ -1053,7 +1053,7 @@
        if (article != null)

        { writer.flush(); article.writeBody(new ExtraDotOutputStream(outs)); - writeLoggedFlushedResponse("."); + writeLoggedFlushedResponse("\r\n."); }

        }

        @@ -1189,7 +1189,7 @@
        if (article != null)

        { writer.flush(); article.writeArticle(new ExtraDotOutputStream(outs)); - writeLoggedFlushedResponse("."); + writeLoggedFlushedResponse("\r\n."); }

        }

        Show
        pezzer Daniel Perry added a comment - Patch to fix this and make james rcf compliant with respect to messages not ending with \r\n. — NNTPHandler_orig.java +++ NNTPHandler.java @@ -1053,7 +1053,7 @@ if (article != null) { writer.flush(); article.writeBody(new ExtraDotOutputStream(outs)); - writeLoggedFlushedResponse("."); + writeLoggedFlushedResponse("\r\n."); } } @@ -1189,7 +1189,7 @@ if (article != null) { writer.flush(); article.writeArticle(new ExtraDotOutputStream(outs)); - writeLoggedFlushedResponse("."); + writeLoggedFlushedResponse("\r\n."); } }
        Hide
        vincenzo Vincenzo Gianferrari Pini added a comment -

        Daniel Perry's patch applied.

        Show
        vincenzo Vincenzo Gianferrari Pini added a comment - Daniel Perry's patch applied.
        Hide
        danny@apache.org Danny Angus added a comment -

        Closing issue fixed in released version.

        Show
        danny@apache.org Danny Angus added a comment - Closing issue fixed in released version.

          People

          • Assignee:
            vincenzo Vincenzo Gianferrari Pini
            Reporter:
            ramazz Rodney Crossman
          • Votes:
            3 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development