Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-535

IMAP FETCH can overflow reply buffer; provide for partial responses

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.3
    • Fix Version/s: 3.4
    • Component/s: None
    • Labels:
      None

      Description

      A single IMAP request can return huge amounts of data (e.g. FETCH)

      An application gets access to this data by calling one of the methods getReplyString() or getReplyStrings() only after the request has completed.

      As well as delaying the response to the application, this may cause the application to run out of memory.

      IMAP replies which return large amounts of data use untagged multi-line responses followed by a tagged status line.

      It would be useful if applications could register to receive such responses in chunks as they arrived. The array list could then be cleared once the chunk had been processed. e.g. the listener could return a boolean to say whether to clear the array.

      If the array was cleared, this would obviously affect any listeners as these are currently only called at the end of the response.
      In this case, listeners could be called with a new status of PARTIAL so they could distinguish the different case if necessary.

      The chunk listener could be passed the IMAP instance; this would give access to the getString[s]() methods. This would be more flexible than passing a String or String[] directly.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: