HUE-1577 [search] Remove null bytes in Solr response

Review Request #3594 - Created Sept. 17, 2013 and discarded

Romain Rigaux
old-hue-rw
HUE-1577
hue
abec, enricoberti
commit 87cf41d1165861452936edd9584f1655149e30fb
Author: Romain Rigaux <romain@cloudera.com>
Date:   Tue Sep 17 13:51:36 2013 -0700

    HUE-1577 [search] Remove null bytes in Solr response

:100644 100644 1a1f358... 49117bb... M	apps/search/src/search/api.py
No sure if we get null or other ones for now.

Tests:
import json

response = '{"uid":"1111111","method":"check_user"}\x00'

# Got 'plain/text' mimetype instead of 'application/json'
try:
  response = json.loads(response)
except ValueError, e:
  # Got some null bytes in the response
  print '%s: %s' % (unicode(e), repr(response))
  response = json.loads(response.replace('\x00', ''))

print response
Review request changed

Status: Discarded

Loading...