-
Notifications
You must be signed in to change notification settings - Fork 70
Fixes unexpected error when request using pulsar 2.4.2 proxy #157
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
Conversation
--- *Motivation* When sending a GET or DELETE request to the Pulsar proxy, the server always threw an IllegalArgumentException. By my test that's because we are setting the Content-Type for a request without the request body. We remove the Content-Type if the request is GET or DELETE. *Modifications* - Remove the header Content-Type for the GET and DELETE requests
sijie
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@zymap does pulsarctl work for 2.4.1 or 2.4.0? What has been changed in pulsar 2.4.2 to fail pulsarctl?
|
@sijie |
|
@zymap : if apache/pulsar#5361 is the root cause, shouldn't we look into that issue? Why do you think removing |
|
@sijie Yes. we should. I look into the issue, the Also, I find the https://tools.ietf.org/html/rfc7231#section-3.1.1.5, |
Why it is -1? Is -1 the right value?
if that's the case, your fix is incorrect, no? If as what you said, wee should add content type based on whether we have content or not. but you are fixing based on the request type. why do you think a delete request will not have content? |
|
-1 is a default value in Jetty. In Pulsarctl the content length is 0.
Ah. You are right, I should add content-type based on whether we have content or not. |
|
@sijie PTAL. Thanks. |
…ative/pulsarctl#157) *Motivation* When sending a GET or DELETE request to the Pulsar proxy, the server always threw an IllegalArgumentException. By my test that's because we are setting the Content-Type for a request without the request body. We remove the Content-Type if the request is GET or DELETE. *Modifications* - Remove the header Content-Type if the content body is empty.
…ative/pulsarctl#157) *Motivation* When sending a GET or DELETE request to the Pulsar proxy, the server always threw an IllegalArgumentException. By my test that's because we are setting the Content-Type for a request without the request body. We remove the Content-Type if the request is GET or DELETE. *Modifications* - Remove the header Content-Type if the content body is empty.
Motivation
When sending a GET or DELETE request to the Pulsar proxy, the server
always threw an IllegalArgumentException. By my test that's because
we are setting the Content-Type for a request without the request body.
We remove the Content-Type if the request is GET or DELETE.
Modifications