couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Filipe Manana (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (COUCHDB-1158) Log server crashes when view contains unicode and log level is set to debug
Date Wed, 11 May 2011 11:30:47 GMT

     [ https://issues.apache.org/jira/browse/COUCHDB-1158?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Filipe Manana updated COUCHDB-1158:
-----------------------------------

    Attachment: couch_log_unicode.patch

Good finding Dale,
Can you tell me if the following patch fixes the issue for your case?


diff --git a/src/couchdb/couch_log.erl b/src/couchdb/couch_log.erl
index 38a1b56..e7405d4 100644
--- a/src/couchdb/couch_log.erl
+++ b/src/couchdb/couch_log.erl
@@ -170,7 +170,8 @@ get_log_messages(Pid, Level, Format, Args) ->
     ConsoleMsg = io_lib:format(
         "[~s] [~p] " ++ Format ++ "~n", [Level, Pid | Args]),
     FileMsg = ["[", httpd_util:rfc1123_date(), "] ", ConsoleMsg],
-    {iolist_to_binary(ConsoleMsg), iolist_to_binary(FileMsg)}.
+    {unicode:characters_to_binary(ConsoleMsg),
+        unicode:characters_to_binary(FileMsg)}.
 
 read(Bytes, Offset) ->
     LogFileName = couch_config:get("log", "file"),

Thanks

> Log server crashes when view contains unicode and log level is set to debug
> ---------------------------------------------------------------------------
>
>                 Key: COUCHDB-1158
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-1158
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>         Environment: OSX, Built from Git - 1.2.0a8a37632-git
>            Reporter: Dale Harvey
>         Attachments: couch_log_unicode.patch
>
>
> When a document contains a simple unicode escaped character and the log level is set
to debug, running any view over the document crashes the log server
> http://pastebin.me/883abdacdb3feca6b4ed965413091458
> will investigate further

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message