Return-Path: X-Original-To: apmail-couchdb-dev-archive@www.apache.org Delivered-To: apmail-couchdb-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E088C92BB for ; Wed, 8 Feb 2012 18:41:24 +0000 (UTC) Received: (qmail 43841 invoked by uid 500); 8 Feb 2012 18:41:24 -0000 Delivered-To: apmail-couchdb-dev-archive@couchdb.apache.org Received: (qmail 43651 invoked by uid 500); 8 Feb 2012 18:41:23 -0000 Mailing-List: contact dev-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@couchdb.apache.org Delivered-To: mailing list dev@couchdb.apache.org Received: (qmail 43544 invoked by uid 99); 8 Feb 2012 18:41:23 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 18:41:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED,T_RP_MATCHES_RCVD X-Spam-Check-By: apache.org Received: from [140.211.11.116] (HELO hel.zones.apache.org) (140.211.11.116) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 08 Feb 2012 18:41:20 +0000 Received: from hel.zones.apache.org (hel.zones.apache.org [140.211.11.116]) by hel.zones.apache.org (Postfix) with ESMTP id 64E451AACC7 for ; Wed, 8 Feb 2012 18:40:59 +0000 (UTC) Date: Wed, 8 Feb 2012 18:40:59 +0000 (UTC) From: "Sam Vevang (Commented) (JIRA)" To: dev@couchdb.apache.org Message-ID: <1001114488.15801.1328726459414.JavaMail.tomcat@hel.zones.apache.org> In-Reply-To: <233255940.15770.1328726099578.JavaMail.tomcat@hel.zones.apache.org> Subject: [jira] [Commented] (COUCHDB-1406) PUTing JSON with invalid UTF-8 returns no error message MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/COUCHDB-1406?page=3Dcom.atlassi= an.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D13= 203827#comment-13203827 ]=20 Sam Vevang commented on COUCHDB-1406: ------------------------------------- Some json with bad utf8 http://bleckys.com/data/broken_unicode.json curl -i -H "Content-Type: application/json" -X PUT --upload-file broken_uni= code.json localhost:5984/somedb/someid =20 > PUTing JSON with invalid UTF-8 returns no error message=20 > -------------------------------------------------------- > > Key: COUCHDB-1406 > URL: https://issues.apache.org/jira/browse/COUCHDB-1406 > Project: CouchDB > Issue Type: Bug > Components: HTTP Interface > Affects Versions: 1.1.1 > Environment: Debian testing=20 > Reporter: Sam Vevang > Priority: Minor > Labels: http, json > > I'm reading utf-8 documents from disk and embedding them in a json struct= ure. Several of them contain invalid utf-8 characters. If I PUT to couchdb = I get a stack trace in my debug log and the tcp connection is dropped--no h= ttp code is returned > [Wed, 08 Feb 2012 17:58:55 GMT] [error] [<0.28906.4>] {error_report,<0.31= .0>, > {<0.28906.4>,crash_report, > [[{initial_call, > {mochiweb_acceptor,init, > ['Argument__1','Argument__2','Argument__3']}}= , > {pid,<0.28906.4>}, > {registered_name,[]}, > {error_info, > {exit, > {ucs,{bad_utf8_character_code}}, > [{xmerl_ucs,from_utf8,1, > [{file,"xmerl_ucs.erl"},{line,185}]}, > {mochijson2,json_encode_string,2, > [{file,"mochijson2.erl"},{line,148}]}, > {mochijson2,'-json_encode_proplist/2-fun-0-'= ,3, > [{file,"mochijson2.erl"},{line,129}]}, > {lists,foldl,3,[{file,"lists.erl"},{line,119= 7}]}, > {mochijson2,json_encode_proplist,2, > [{file,"mochijson2.erl"},{line,132}]}, > {couch_httpd,send_json,4, > [{file,"couch_httpd.erl"},{line,635}]}, > {couch_httpd,handle_request_int,5, > [{file,"couch_httpd.erl"},{line,272}]}, > {mochiweb_http,headers,5, > [{file,"mochiweb_http.erl"},{line,126}]}]}}= , > {ancestors, > [couch_httpd,couch_secondary_services, > couch_server_sup,<0.32.0>]}, > {messages,[]}, > {links,[<0.113.0>,#Port<0.30990>]}, > {dictionary, > [{mochiweb_request_body, > <<"{\"id\":111,\"doc\":\"ker\\u0019=C2=A0u\"= }\n">>}, > {mochiweb_request_qs,[]}, > {mochiweb_request_recv,true}, > {jsonp,no_jsonp}, > {mochiweb_request_cookie,[]}]}, > {trap_exit,false}, > {status,running}, > {heap_size,2584}, > {stack_size,24}, > {reductions,7048}], > []]}} -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrato= rs: https://issues.apache.org/jira/secure/ContactAdministrators!default.jsp= a For more information on JIRA, see: http://www.atlassian.com/software/jira