{"action":"created","issue":{"url":"https://api.github.com/repos/shafreeck/cetcd/issues/37","repository_url":"https://api.github.com/repos/shafreeck/cetcd","labels_url":"https://api.github.com/repos/shafreeck/cetcd/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/shafreeck/cetcd/issues/37/comments","events_url":"https://api.github.com/repos/shafreeck/cetcd/issues/37/events","html_url":"https://github.com/shafreeck/cetcd/issues/37","id":174965061,"number":37,"title":"Issue when set contains large value","user":{"login":"kinsu","id":8173392,"avatar_url":"https://avatars.githubusercontent.com/u/8173392?v=3","gravatar_id":"","url":"https://api.github.com/users/kinsu","html_url":"https://github.com/kinsu","followers_url":"https://api.github.com/users/kinsu/followers","following_url":"https://api.github.com/users/kinsu/following{/other_user}","gists_url":"https://api.github.com/users/kinsu/gists{/gist_id}","starred_url":"https://api.github.com/users/kinsu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kinsu/subscriptions","organizations_url":"https://api.github.com/users/kinsu/orgs","repos_url":"https://api.github.com/users/kinsu/repos","events_url":"https://api.github.com/users/kinsu/events{/privacy}","received_events_url":"https://api.github.com/users/kinsu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-04T19:22:02Z","updated_at":"2016-09-05T10:47:35Z","closed_at":null,"body":"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).\r\netcd replies with HTTP/1.1 100 Continue and then HTTP/1.1 200 OK.\r\n\r\nerror :1000, not a json response (HTTP/1.1 200 OK\r\n)\r\nError Code:1000\r\nError Message:not a json response\r\nError Cause:HTTP/1.1 200 OK\r\n\r\n\r\nOne possible workarround is the disable the Expect: 100-continue in the send request\r\n\r\n@@ -1122,9 +1129,15 @@ void *cetcd_send_request(CURL *curl, cetcd_request *req) {\r\n     curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, cetcd_parse_response);\r\n     curl_easy_setopt(curl, CURLOPT_VERBOSE, req->cli->settings.verbose);\r\n     curl_easy_setopt(curl, CURLOPT_CONNECTTIMEOUT, req->cli->settings.connect_timeout);\r\n+    \r\n+    struct curl_slist *chunk = NULL;\r\n+    chunk = curl_slist_append(chunk, \"Expect:\");\r\n+    res = curl_easy_setopt(curl, CURLOPT_HTTPHEADER, chunk);\r\n \r\n     res = curl_easy_perform(curl);\r\n \r\n+    curl_slist_free_all(chunk);\r\n\r\nif that's OK i can send a pull request."},"comment":{"url":"https://api.github.com/repos/shafreeck/cetcd/issues/comments/244717727","html_url":"https://github.com/shafreeck/cetcd/issues/37#issuecomment-244717727","issue_url":"https://api.github.com/repos/shafreeck/cetcd/issues/37","id":244717727,"user":{"login":"shafreeck","id":418483,"avatar_url":"https://avatars.githubusercontent.com/u/418483?v=3","gravatar_id":"","url":"https://api.github.com/users/shafreeck","html_url":"https://github.com/shafreeck","followers_url":"https://api.github.com/users/shafreeck/followers","following_url":"https://api.github.com/users/shafreeck/following{/other_user}","gists_url":"https://api.github.com/users/shafreeck/gists{/gist_id}","starred_url":"https://api.github.com/users/shafreeck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shafreeck/subscriptions","organizations_url":"https://api.github.com/users/shafreeck/orgs","repos_url":"https://api.github.com/users/shafreeck/repos","events_url":"https://api.github.com/users/shafreeck/events{/privacy}","received_events_url":"https://api.github.com/users/shafreeck/received_events","type":"User","site_admin":false},"created_at":"2016-09-05T10:47:35Z","updated_at":"2016-09-05T10:47:35Z","body":"What would happen when `100 Continue` is disabled with large value ?"}}
{"actor":{"display_login":"shafreeck"}}