Project

General

Profile

Feature #10119

[PATCH] [net/imap] Add CHANGEDSINCE FETCH modifier + complementary add MODSEQ Message Data Item in FETCH Command

Added by plehoux (Philippe-Antoine Lehoux) about 3 years ago. Updated about 2 months ago.

Status:
Closed
Priority:
Normal
Target version:
[ruby-core:64272]

modseq-changedsince-changes.patch (2.27 KB) modseq-changedsince-changes.patch plehoux (Philippe-Antoine Lehoux), 08/08/2014 07:57 PM
modseq-changedsince-changes-UPDATED.patch (4.3 KB) modseq-changedsince-changes-UPDATED.patch plehoux (Philippe-Antoine Lehoux), 05/10/2017 05:08 PM

Associated revisions

Revision 59424
Added by shugo (Shugo Maeda) about 2 months ago

lib/net/imap.rb: support CHANGEDSINCE and MODSEQ

Patch by plehoux (Philippe-Antoine Lehoux). [Feature #10119]

History

#1 [ruby-core:64277] Updated by nobu (Nobuyoshi Nakada) about 3 years ago

  • Subject changed from [PATCH] Add CHANGEDSINCE FETCH modifier + complementary add MODSEQ Message Data Item in FETCH Command to [PATCH] [net/imap] Add CHANGEDSINCE FETCH modifier + complementary add MODSEQ Message Data Item in FETCH Command
  • Description updated (diff)

#2 [ruby-core:64325] Updated by hsbt (Hiroshi SHIBATA) about 3 years ago

  • Status changed from Open to Assigned

#3 [ruby-core:67419] Updated by shugo (Shugo Maeda) over 2 years ago

  • Status changed from Assigned to Feedback

It seems to be a bug that store_internal is changed not to use flags.
What was your intention?

Could you write tests for this change?

#4 [ruby-core:81095] Updated by plehoux (Philippe-Antoine Lehoux) 4 months ago

  • File modseq-changedsince-changes-UPDATED.patch added

The above patch was wrong. There is/was no flags variable in current/previous ruby versions.

The attached patch now correctly reflect the real diff.

I also added this test as requested:

  # [Bug #10119]
  def test_msg_att_modseq_data
    parser = Net::IMAP::ResponseParser.new
    response = parser.parse("* 1 FETCH (FLAGS (\Seen) MODSEQ (12345) UID 5)\r\n")
    assert_equal(12345, response.data.attr["MODSEQ"])
  end

#5 Updated by plehoux (Philippe-Antoine Lehoux) 4 months ago

  • File deleted (modseq-changedsince-changes-UPDATED.patch)

#6 [ruby-core:81097] Updated by plehoux (Philippe-Antoine Lehoux) 4 months ago

I updated the patch so the code doesn't raise when passing a CHANGEDSINCE value bigger than 4294967296, as defined by rfc 4551.

https://tools.ietf.org/html/rfc4551 :

mod-sequence-value = 1*DIGIT
;; Positive unsigned 64-bit integer
;; (mod-sequence)
;; (1 <= n < 18,446,744,073,709,551,615)

#7 Updated by shugo (Shugo Maeda) 2 months ago

  • Status changed from Feedback to Assigned

#8 Updated by shugo (Shugo Maeda) about 2 months ago

  • Status changed from Assigned to Closed

Applied in changeset trunk|r59424.


lib/net/imap.rb: support CHANGEDSINCE and MODSEQ

Patch by plehoux (Philippe-Antoine Lehoux). [Feature #10119]

#9 [ruby-core:82173] Updated by shugo (Shugo Maeda) about 2 months ago

plehoux (Philippe-Antoine Lehoux) wrote:

I updated the patch so the code doesn't raise when passing a CHANGEDSINCE value bigger than 4294967296, as defined by rfc 4551.

I've merged it. Thank you!

Also available in: Atom PDF