MCPcopy Index your code
hub / github.com/ycm-core/YouCompleteMe / _ValidateResponseObject

Function _ValidateResponseObject

python/ycm/client/base_request.py:317–323  ·  view source on GitHub ↗
( response, response_text )

Source from the content-addressed store, hash-verified

315
316
317def _ValidateResponseObject( response, response_text ):
318 if not response_text:
319 return
320 our_hmac = CreateHmac( response_text, BaseRequest.hmac_secret )
321 their_hmac = ToBytes( b64decode( response.headers[ _HMAC_HEADER ] ) )
322 if not compare_digest( our_hmac, their_hmac ):
323 raise RuntimeError( 'Received invalid HMAC for response!' )
324
325
326def _BuildUri( handler ):

Callers 1

_JsonFromFutureFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected