{"action":"created","issue":{"url":"https://api.github.com/repos/stash/Feersum/issues/18","labels_url":"https://api.github.com/repos/stash/Feersum/issues/18/labels{/name}","comments_url":"https://api.github.com/repos/stash/Feersum/issues/18/comments","events_url":"https://api.github.com/repos/stash/Feersum/issues/18/events","html_url":"https://github.com/stash/Feersum/issues/18","id":95093630,"number":18,"title":"memory leak when the method of http request is POST","user":{"login":"truexf","id":6917177,"avatar_url":"https://avatars.githubusercontent.com/u/6917177?v=3","gravatar_id":"","url":"https://api.github.com/users/truexf","html_url":"https://github.com/truexf","followers_url":"https://api.github.com/users/truexf/followers","following_url":"https://api.github.com/users/truexf/following{/other_user}","gists_url":"https://api.github.com/users/truexf/gists{/gist_id}","starred_url":"https://api.github.com/users/truexf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truexf/subscriptions","organizations_url":"https://api.github.com/users/truexf/orgs","repos_url":"https://api.github.com/users/truexf/repos","events_url":"https://api.github.com/users/truexf/events{/privacy}","received_events_url":"https://api.github.com/users/truexf/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-15T03:05:40Z","updated_at":"2015-07-31T02:13:40Z","closed_at":null,"body":"1. app.psgi\r\nmy $counter = 0;\r\nmy $app = sub {\r\n    my $env = shift;\r\n\r\n    my $request = Plack::Request->new($env); \r\n    my ($domain) = $request->env->{HTTP_HOST} =~ m/\\.(\\w+\\.[a-z]+)(?::\\d+)?$/;\r\n    my $path = lc $request->path_info;\r\n   \r\n    printf STDOUT \"client: %s\\n\",$request->address;\r\n    printf STDOUT \"method: %s\\n\",$request->method;\r\n    printf STDOUT \"request_uri: %s\\n\",$request->request_uri;\r\n    printf STDOUT \"path: %s\\n\",$path;\r\n    printf STDOUT \"query_string: %s\\n\",$request->query_string;    \r\n    printf STDOUT \"parameters:\\n\";\r\n    my @param_keys = $request->parameters->keys;\r\n    foreach my $key (@param_keys){\r\n        printf STDOUT \"%s: %s\\n\", $key,$request->parameters->get($key);\r\n    }\r\n    printf STDOUT \"body: %s\\n\",$request->content;\r\n    printf STDOUT \"body: %d\\n\",$request->content_length;\r\n    \r\n    print STDOUT \"------------------------------\\n\";\r\n    \r\n    if ($path eq '/echo') {\r\n        \r\n        my $env = shift;\r\n        my $n = $counter++;\r\n        return [200, [\r\n            'Content-Type' => 'text/plain',\r\n            'Connection' => 'close',\r\n        ], [\"Hello customer number 0x\",sprintf('%08x',$n),\"\\n\"]];\r\n\r\n    } else {\r\n        my $env = shift;\r\n        my $n = $counter++;\r\n        return [200, [\r\n            'Content-Type' => 'text/plain',\r\n            'Connection' => 'close',\r\n        ], [\"Hello customer number 0x\",sprintf('%08x',$n),\"\\n\"]];\r\n    }\r\n};\r\n\r\n\r\n2. $ feersum -p=5000 app.psgi\r\n3. test.sh\r\nwhile true; do\r\ncurl --data 'b64=35pyN5Yqh54Y+3Cgrlub/mkq3nlLXop4boioLnm67liLbkvZznu4/okKXorrjlj6/or4HvvIjkuqzvvInlrZfnrKw4Mjjlj7cg55Sy5rWL6LWE5a2XMTEwMDA3OCDkuqzlhaznvZHlronlpIcxMTAwMDAwMDAwMTblj7cK&b64end=haha' 'localhost:5000/abcde?a=b&c=e&d=fadsf'\r\ndone\r\n\r\n$ ./test.sh\r\n\r\n4. result: the memory use of the feersum process is increasing quickly..\r\n\r\nthankyou for giving me some response!\r\nmail: fangyousong@qq.com\r\n"},"comment":{"url":"https://api.github.com/repos/stash/Feersum/issues/comments/126542933","html_url":"https://github.com/stash/Feersum/issues/18#issuecomment-126542933","issue_url":"https://api.github.com/repos/stash/Feersum/issues/18","id":126542933,"user":{"login":"truexf","id":6917177,"avatar_url":"https://avatars.githubusercontent.com/u/6917177?v=3","gravatar_id":"","url":"https://api.github.com/users/truexf","html_url":"https://github.com/truexf","followers_url":"https://api.github.com/users/truexf/followers","following_url":"https://api.github.com/users/truexf/following{/other_user}","gists_url":"https://api.github.com/users/truexf/gists{/gist_id}","starred_url":"https://api.github.com/users/truexf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/truexf/subscriptions","organizations_url":"https://api.github.com/users/truexf/orgs","repos_url":"https://api.github.com/users/truexf/repos","events_url":"https://api.github.com/users/truexf/events{/privacy}","received_events_url":"https://api.github.com/users/truexf/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T02:13:40Z","updated_at":"2015-07-31T02:13:40Z","body":"hello, every body,i have fixed this bug:\r\ninstert follow code at line 2000,in file Feersum.xs:\r\n    if (request_cb_is_psgi && c->expected_cl > 0) {\r\n        SvREFCNT_dec(c->self);\r\n    }"}}