add: strip_realm(_realm);
context: auth_result_t pre_auth(struct sip_msg* _m, str* _realm, int _hftype, struct hdr_field** _h){	int ret;	auth_body_t* c;	struct sip_uri uri;	     /* ACK and CANCEL must be always authorized, there is	      * no way how to challenge ACK and CANCEL cannot be	      * challenged because it must have the same CSeq as	      * the request to be cancelled	      */	if ((_m->REQ_METHOD == METHOD_ACK) ||  (_m->REQ_METHOD == METHOD_CANCEL)) return AUTHORIZED;	if (_realm->len == 0) {		if (get_realm(_m, _hftype, &uri) < 0) {			LOG(L_ERR, "pre_auth(): Error while extracting realm\n");			if (send_resp(_m, 400, MESSAGE_400, 0, 0) == -1) {				LOG(L_ERR, "pre_auth(): Error while sending 400 reply\n");			}			return ERROR;		}				*_realm = uri.host;	}	     /* Try to find credentials with corresponding realm	      * in the message, parse them and return pointer to	      * parsed structure	      */	ret = find_credentials(_m, _realm, _hftype, _h);	if (ret < 0) {		LOG(L_ERR, "pre_auth(): Error while looking for credentials\n");		if (send_resp(_m, (ret == -2) ? 500 : 400, 			      (ret == -2) ? MESSAGE_500 : MESSAGE_400, 0, 0) == -1) {			LOG(L_ERR, "pre_auth(): Error while sending 400 reply\n");		}		return ERROR;	} else if (ret > 0) {		DBG("pre_auth(): Credentials with given realm not found\n");		return NOT_AUTHORIZED;	}	     /* Pointer to the parsed credentials */	c = (auth_body_t*)((*_h)->parsed);	     /* Check credentials correctness here */	if (check_dig_cred(&(c->digest)) != E_DIG_OK) {		LOG(L_ERR, "pre_auth(): Credentials received are not filled properly\n");		if (send_resp(_m, 400, MESSAGE_400, 0, 0) == -1) {			LOG(L_ERR, "pre_auth(): Error while sending 400 reply\n");		}		return ERROR;	}	if (check_nonce(&c->digest.nonce, &secret) != 0) {		DBG("pre_auth(): Invalid nonce value received\n");		return NOT_AUTHORIZED;	}	return DO_AUTHORIZATION;}