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

Proposed by Barry Warsaw
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 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.
Revision history for this message
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.

Revision history for this message
Barry Warsaw (barry) wrote :

Done!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/whoopsie.c'
--- src/whoopsie.c 2015-11-03 21:30:06 +0000
+++ src/whoopsie.c 2016-03-17 20:28:55 +0000
@@ -416,8 +416,8 @@
416 memcpy (value_p, p, value_length);416 memcpy (value_p, p, value_length);
417 value_p[value_length] = '\0';417 value_p[value_length] = '\0';
418 for (char *c = value_p; c < value_p + value_length; c++)418 for (char *c = value_p; c < value_p + value_length; c++)
419 /* If c is a control character. */419 /* If c is a control character but not TAB. */
420 if (*c >= '\0' && *c < ' ')420 if (*c != '\t' && *c >= '\0' && *c < ' ')
421 *c = '?';421 *c = '?';
422 value_p += value_length;422 value_p += value_length;
423 g_hash_table_insert (hash_table, key, value ? value : "");423 g_hash_table_insert (hash_table, key, value ? value : "");

Subscribers

People subscribed via source and target branches

to all changes:
to status/vote changes: