GitHub PullRequestReviewCommentEvent at 2014-04-28 16:15:46
Repository: rack-utf8_sanitizer
Actor: whitequark
Payload: {"comment":{"url":"https://api.github.com/repos/whitequark/rack-utf8_sanitizer/pulls/comments/12053786","id":12053786,"diff_hunk":"@@ -151,4 +151,45 @@\n       env[\"REQUEST_PATH\"].should.be.frozen\n     end\n   end\n+\n+  describe \"with form data\" do\n+    shared :does_sanitize_form_data do\n+      it \"sanitizes form data\" do\n+        @plain_input = \"foo bar лол\".force_encoding('UTF-8')\n+        @uri_input   = \"http://bar/foo+%2F%3A+bar+%D0%BB%D0%BE%D0%BB\".force_encoding('UTF-8')\n+        env = @app.({\n+          \"REQUEST_METHOD\" => \"POST\",\n+           \"CONTENT_TYPE\" => \"application/x-www-form-urlencoded;foo=bar\",\n+           \"HTTP_USER_AGENT\" => @plain_input,\n+           \"rack.input\" => StringIO.new(@rack_input),\n+        })\n+        result = env['rack.input'].read\n+        result.encoding.should == Encoding::UTF_8\n+        result.should.be.valid_encoding\n+        yield result if block_given?\n+        env['rack.input'].rewind\n+        behaves_like :does_sanitize_plain\n+        behaves_like :does_sanitize_uri\n+        behaves_like :identity_plain\n+        behaves_like :identity_uri","path":"test/test_utf8_sanitizer.rb","position":24,"original_position":24,"commit_id":"baf6309fcf0b4dfceb0dc9199ff487b05c1c35d9","original_commit_id":"0ca54cc302118b2e6d8652f8e389a94e7c7ee7f4","user":{"login":"whitequark","id":54771,"avatar_url":"https://avatars.githubusercontent.com/u/54771?","gravatar_id":"89d887b50262bbe10225d36d974fdb0c","url":"https://api.github.com/users/whitequark","html_url":"https://github.com/whitequark","followers_url":"https://api.github.com/users/whitequark/followers","following_url":"https://api.github.com/users/whitequark/following{/other_user}","gists_url":"https://api.github.com/users/whitequark/gists{/gist_id}","starred_url":"https://api.github.com/users/whitequark/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/whitequark/subscriptions","organizations_url":"https://api.github.com/users/whitequark/orgs","repos_url":"https://api.github.com/users/whitequark/repos","events_url":"https://api.github.com/users/whitequark/events{/privacy}","received_events_url":"https://api.github.com/users/whitequark/received_events","type":"User","site_admin":false},"body":"OK, please do clean up and add support for other IO types. I'll review it afterwards.","created_at":"2014-04-28T16:15:46Z","updated_at":"2014-04-28T16:15:46Z","html_url":"https://github.com/whitequark/rack-utf8_sanitizer/pull/8#discussion_r12053786","pull_request_url":"https://api.github.com/repos/whitequark/rack-utf8_sanitizer/pulls/8","_links":{"self":{"href":"https://api.github.com/repos/whitequark/rack-utf8_sanitizer/pulls/comments/12053786"},"html":{"href":"https://github.com/whitequark/rack-utf8_sanitizer/pull/8#discussion_r12053786"},"pull_request":{"href":"https://api.github.com/repos/whitequark/rack-utf8_sanitizer/pulls/8"}}}}