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

Hazelcast REST API doesn't handle correctly HTTP requests without headers #14353

Closed
kwart opened this issue Jan 8, 2019 · 0 comments · Fixed by #14354
Closed

Hazelcast REST API doesn't handle correctly HTTP requests without headers #14353

kwart opened this issue Jan 8, 2019 · 0 comments · Fixed by #14354

Comments

@kwart
Copy link
Member

@kwart kwart commented Jan 8, 2019

When a client sends HTTP request without HTTP headers to Hazelcast REST API, the HttpCommand class wrongly expects an additional new line:

Reproducer
Sample HTTP request which doesn't provide response:

GET /hazelcast/rest/management/cluster/version HTTP/1.0<CRLF>
<CRLF>

Workaround 1
Create a crafted request which adds an extra new line:

GET /hazelcast/rest/management/cluster/version HTTP/1.0<CRLF>
<CRLF>
<CRLF>

Workaround 2
Use HTTP header(s):

GET /hazelcast/rest/management/cluster/version HTTP/1.0<CRLF>
Host: 127.0.01<CRLF>
<CRLF>
@kwart kwart added this to the 3.12 milestone Jan 8, 2019
@kwart kwart self-assigned this Jan 8, 2019
kwart added a commit to kwart/hazelcast that referenced this issue Jan 8, 2019
…without HTTP headers. The commit improves test coverage too (speed-up and run on PR builder).
kwart added a commit to kwart/hazelcast that referenced this issue Jan 8, 2019
…without HTTP headers. The commit improves test coverage too (speed-up and run on PR builder).
@kwart kwart closed this in #14354 Jan 9, 2019
kwart added a commit that referenced this issue Jan 9, 2019
…TTP headers. The commit improves test coverage too (speed-up and run on PR builder).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

2 participants