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

Comments

Projects
None yet
1 participant
@kwart
Copy link
Contributor

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

Resolves hazelcast#14353. Fixes REST API to parse correctly requests …
…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

Resolves hazelcast#14353. Fixes REST API to parse correctly requests …
…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

Resolves #14353. Fixes REST API to parse correctly requests without H…
…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
You can’t perform that action at this time.