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

UpgradeHandler fails to notify the application of the initial data. #30341

Closed
pmd1nh opened this issue Dec 4, 2024 · 0 comments · Fixed by #30328
Closed

UpgradeHandler fails to notify the application of the initial data. #30341

pmd1nh opened this issue Dec 4, 2024 · 0 comments · Fixed by #30328
Assignees
Labels
release bug This bug is present in a released version of Open Liberty release:25001 team:Sirius

Comments

@pmd1nh
Copy link
Member

pmd1nh commented Dec 4, 2024

Describe the bug
Client can send an Upgrade request along with some data immediately after the upgrade request headers (before receiving 101 Switching Protocols response). If the initial package (headers + data) comes into the server faster than the channel can parse/handle, those data are read in by the channel but does not notify the application (via registered ReadListener) for handling; thus appear to be missing.

It can happen after a server cold start. Subsequent requests should be fine.

If the initial data is sent AFTER the client has received the initial response of 101 Switching Protocols , it always work. i.e

request >> upgrade request
response << `101 Switching Protocols`
request >> data

Though this is not a requirement (yet), it is recommended to send data after received 101 response as the server may fail to upgrade and switch to new protocols; thus, the data ends up being discarded.

There is no server error or message when this happens.

Steps to Reproduce
-Start server
-Send Upgrade request and some data immediately after the upgrade request headers.
-Application may not be notified of these initial data. (Typically happens in the first request after a server startup; all subsequent requests are fine).

Expected behavior
Application should always be notified of the available data.

Diagnostic information:

  • OpenLiberty Version: [All]
  • Affected feature(s) [servlet-3.1 or above]
  • Java Version: [JDK 8 or above]

Additional context

@github-project-automation github-project-automation bot moved this to General Issues in Web Tier Team Dec 9, 2024
@pmd1nh pmd1nh added the release bug This bug is present in a released version of Open Liberty label Dec 13, 2024
@pmd1nh pmd1nh changed the title UpgradeHandler may not read the initial data UpgradeHandler may not notify the application of the initial data. Dec 13, 2024
@pmd1nh pmd1nh changed the title UpgradeHandler may not notify the application of the initial data. UpgradeHandler fails to notify the application of the initial data. Dec 16, 2024
@github-project-automation github-project-automation bot moved this from General Issues to Completed Tasks in Web Tier Team Dec 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release bug This bug is present in a released version of Open Liberty release:25001 team:Sirius
Projects
Status: Completed Tasks
3 participants