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

Bug Fix: SSE Events lines MUST NOT contain \r #5868

Open
wants to merge 6 commits into
base: 3.1
Choose a base branch
from

Conversation

mkarg
Copy link
Member

@mkarg mkarg commented Feb 15, 2025

According to https://html.spec.whatwg.org/multipage/server-sent-events.html#parsing-an-event-stream any line within an SSE Event MUST NOT contain any of the characters \n, \r nor the combination \r\n.

@mkarg
Copy link
Member Author

mkarg commented Feb 16, 2025

@jansupol This PR fails because of incorrect Copyright check in Jersey's POM.xml. According to Eclipse Foundation's rules, all projects MUST accept the short form having only the initial publication date (see https://www.eclipse.org/projects/handbook/#ip-copyright-headers). Apparently Jersey's POM.xml expects to find the latest date, which is wrong. What is your decision how to proceed?

@jansupol
Copy link
Contributor

@mkarg In Jersey project, we follow the advice of Oracle legal department to contain the copyright year with the last year of a change. This is enforced by the glassfish copyright plugin created for that purpose. Do you have a hard time to increase the copyright year in the changed files?

@mkarg
Copy link
Member Author

mkarg commented Feb 19, 2025

@mkarg In Jersey project, we follow the advice of Oracle legal department to contain the copyright year with the last year of a change. This is enforced by the glassfish copyright plugin created for that purpose. Do you have a hard time to increase the copyright year in the changed files?

You mean, besides me being an Eclipse Committer Member bound solely to Eclipse Foundation rules, not employed with Oracle, not bound to Oracle-internal rules?

The EF is pretty clear here:

Do we need to specify a range of years in the copyright statement?
No. In the past, legal advice was that the year of the initial creation of the content and the year of the last change should be reflected in the copyright header. This is no longer the case. Specify the year that the content was initially created in the copyright statement.

@mkarg
Copy link
Member Author

mkarg commented Feb 21, 2025

@jansupol FYI: Fixed Copyright according Oracle rules.

@mkarg
Copy link
Member Author

mkarg commented Feb 23, 2025

Apparently you did not find the time to review / merge this PR, so I used the time to author a commit ontop with a unit test for DataLeadStream. If I didn't miss something, it should contain all possible edge cases around EOL handling (at the start, at the end, mixing of write(int) and write(char[]) etc. Maybe it is beneficial for the review, it actual was very beneficial when authoring performance improvements of SSE (to be found eventually in separate PRs once this one got merged). 😃

@mkarg
Copy link
Member Author

mkarg commented Feb 24, 2025

@jansupol Anything more needed to review / merge this bug fix? 🤔

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 this pull request may close these issues.

2 participants