-
Notifications
You must be signed in to change notification settings - Fork 39
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
Issue when set contains large value #37
Comments
What would happen when |
then cetcd will send the full payload towards etcd (100-continue will not be returned from etcd) |
Sorry for my late reply. It looks good to me. Please send me a pull request if you will. |
In this case with larger value string, it's libcurl initiated the "expect 100-continue). Disable it should works. |
it appears that when value of the key is large (something larger than 1024 or so) Expect: 100-continue is used from libcurl (if i can recall by defult) and state machine is troubled(response_discard_st).
etcd replies with HTTP/1.1 100 Continue and then HTTP/1.1 200 OK.
error :1000, not a json response (HTTP/1.1 200 OK
)
Error Code:1000
Error Message:not a json response
Error Cause:HTTP/1.1 200 OK
One possible workarround is the disable the Expect: 100-continue in the send request
@@ -1122,9 +1129,15 @@ void *cetcd_send_request(CURL *curl, cetcd_request *req) {
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cetcd_parse_response);
curl_easy_setopt(curl, CURLOPT_VERBOSE, req->cli->settings.verbose);
curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, req->cli->settings.connect_timeout);
res = curl_easy_perform(curl);
if that's OK i can send a pull request.
The text was updated successfully, but these errors were encountered: