Update API schema to allow non-ASCII HTTP responses to be cached.

Review Request #6735 - Created Jan. 5, 2015 and submitted

Barret Rennie
RBTools
master
31fc88f...
rbtools

Previously, if rbt was used to fetch a a response that was not
encoded with ASCII, writing to the SQLite database would cause it to
crash due to trying to insert binary data into a text field. The API
cache now stores the response body as a binary blob. The caching layer
no longer has to worry about the encoding or data type of the data
being cached.

Because of the schema change, update API Cache schema to version 2.

Use unicode literals in api/cache.py.

Unit tests passed.

Posted and updated this review request with the patch.

Caching an HTTP response that is not ASCII encoded no longer causes
rbt to crash.

Review Bot
  1. Tool: PEP8 Style Checker
    Processed Files:
        rbtools/api/cache.py
    
    
    
    Tool: Pyflakes
    Processed Files:
        rbtools/api/cache.py
    
    
  2. 
      
David Trowbridge
  1. Ship It!
  2. 
      
Christian Hammond
  1. Ship It!
  2. 
      
Barret Rennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (a8446ad)
Loading...