signal-desktop/libtextsecure
Lilia d1f7f5ee8c Fix json parsing exceptions obscuring server errors (#1605)
I got a 413 (Rate limit exceeded) error from the server while fetching prekeys.
The client tried to parse the response as json since we expect json from the
prekey endpoint, which threw an exception because the response was not json.
This change prevents us from treating the response as json unless it has the
Content-Type header set accordingly.

If for some reason, the client and server disagree on whether the response
should be or is json, we'll default to treating it as text.

// FREEBIE
2017-10-24 15:54:46 -07:00
..
storage Cache messages on receipt, remove from cache when processed 2017-08-04 12:03:25 -07:00
test Profiles (#1453) 2017-09-14 17:04:00 -07:00
account_manager.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
api.js Fix json parsing exceptions obscuring server errors (#1605) 2017-10-24 15:54:46 -07:00
components.js Update autosize, which should fix stack overflow error (#1560) 2017-10-13 11:44:35 -07:00
contacts_parser.js Profiles (#1453) 2017-09-14 17:04:00 -07:00
crypto.js Profiles (#1453) 2017-09-14 17:04:00 -07:00
errors.js Decrypt any IncomingIdentityKeyError still sticking around 2017-08-12 13:17:53 -07:00
event_target.js Animated loading screens on startup and first conversation load 2017-08-04 12:03:25 -07:00
helpers.js Move, rename, and simplify toArrayBuffer helper 2016-03-13 04:56:28 -07:00
key_worker.js Remove erroneous license file and headers 2015-09-07 14:58:42 -07:00
libsignal-protocol.js Set messageKeysLimit to unlimited if communicating with our devices (#1348) 2017-08-04 12:25:30 -07:00
message_receiver.js Better handling of online/offline behavior, socket shutdown (#1593) 2017-10-23 14:38:43 -07:00
outgoing_message.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
protobufs.js Protobufs: More logging on failure to load protobufs, fix tests 2017-09-14 17:02:45 -07:00
protocol_wrapper.js Update libsignal-protocol v0.9.0 2016-05-17 12:03:37 -07:00
ProvisioningCipher.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
sendmessage.js Feature: Blue check marks for read messages if opted in (#1489) 2017-10-04 15:28:43 -07:00
storage.js Remove erroneous license file and headers 2015-09-07 14:58:42 -07:00
stringview.js Remove erroneous license file and headers 2015-09-07 14:58:42 -07:00
sync_request.js Add logging to help track down problems with Sync 2017-08-17 17:33:22 -07:00
task_with_timeout.js createTaskWithTimeout: Don't log expiration if task threw (#1412) 2017-08-30 13:33:55 -07:00
websocket-resources.js Better handling of online/offline behavior, socket shutdown (#1593) 2017-10-23 14:38:43 -07:00