Merge lp:~barry/whoopsie/lp1390627 into lp:whoopsie

Proposed by Barry Warsaw on 2016-03-17
Status: Merged
Merged at revision: 677
Proposed branch: lp:~barry/whoopsie/lp1390627
Merge into: lp:whoopsie
Diff against target: 14 lines (+2/-2)
1 file modified
src/whoopsie.c (+2/-2)
To merge this branch: bzr merge lp:~barry/whoopsie/lp1390627
Reviewer Review Type Date Requested Status
Brian Murray 2016-03-17 Pending
Review via email: mp+289428@code.launchpad.net

Description of the change

Whoopsie was converting all "control characters" (i.e. less than ASCII SPACE) to a '?'. This just modifies the conditional so that it won't convert TAB characters. It appears that bson still does the right thing.

When viewed in a web page, you won't see the TABs but rather than e.g. convert them to a space, I figured since they are preserved across the wire, might as well preserve the original char.

To post a comment you must log in.
Brian Murray (brian-murray) wrote :

Wow, I thought I'd looked through whoopsie when I noticed the bug. Thanks for fixing this, feel free to upload it.

Barry Warsaw (barry) wrote :

Done!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/whoopsie.c'
2--- src/whoopsie.c 2015-11-03 21:30:06 +0000
3+++ src/whoopsie.c 2016-03-17 20:28:55 +0000
4@@ -416,8 +416,8 @@
5 memcpy (value_p, p, value_length);
6 value_p[value_length] = '\0';
7 for (char *c = value_p; c < value_p + value_length; c++)
8- /* If c is a control character. */
9- if (*c >= '\0' && *c < ' ')
10+ /* If c is a control character but not TAB. */
11+ if (*c != '\t' && *c >= '\0' && *c < ' ')
12 *c = '?';
13 value_p += value_length;
14 g_hash_table_insert (hash_table, key, value ? value : "");

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: