Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Response lines starts with '* ' after FETCH containing quoted string with unmatched parens #51

Open
filiphanes opened this issue Jul 24, 2020 · 2 comments · May be fixed by #52
Open

Response lines starts with '* ' after FETCH containing quoted string with unmatched parens #51

filiphanes opened this issue Jul 24, 2020 · 2 comments · May be fixed by #52

Comments

@filiphanes
Copy link

Counting matching parens in FetchCommand.wait_data() may not be good idea.
fix is coming ...

@lllama
Copy link

lllama commented Nov 25, 2021

Just a plus one on this issue. A simple reproduction is if the email has an opening ( in its subject. All subsequent lines will start with *.

@bamthomas
Copy link
Owner

bamthomas commented Dec 31, 2021

weird, for now I can reproduce with a real test, activating debug.
But I can't with a unit test : data is in bytearrays and is not concerned by the parenthesis matching :

    def wait_data(self) -> bool:
        last_fetch_index = 0
        for index, line in enumerate(self._resp_lines):
            if isinstance(line, bytes) and self.FETCH_MESSAGE_DATA_RE.match(line):
                last_fetch_index = index
        return not matched_parenthesis(b''.join(filter(lambda l: isinstance(l, bytes),
                                                      self.response.lines[last_fetch_index:])))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants