def _handle_get(gs_stub, filename, param_dict, headers):
 if (filename.rfind('/') == 0):
  return _handle_get_bucket(gs_stub, filename, param_dict)
 else:
  result = _handle_head(gs_stub, filename)
  if (result.status_code == 404):
   return result
  (start, end) = _Range(headers).value
  st_size = result.headers['content-length']
  if (end is None):
   end = (st_size - 1)
  result.headers['content-range'] = ('bytes: %d-%d/%d' % (start, end, st_size))
  result.content = gs_stub.get_object(filename, start, end)
  return result

def _handle_get ( gs_stub , filename , param_dict , headers ) : if ( filename . rfind ( '/' ) == 0 ) : return _handle_get_bucket ( gs_stub , filename , param_dict ) else : result = _handle_head ( gs_stub , filename ) if ( result . status_code == 404 ) : return result ( start , end ) = _Range ( headers ) . value st_size = result . headers [ 'content-length' ] if ( end is None ) : end = ( st_size - 1 ) result . headers [ 'content-range' ] = ( 'bytes: %d-%d/%d' % ( start , end , st_size ) ) result . content = gs_stub . get_object ( filename , start , end ) return result
handle get object and get bucket .