- const char *tag = NULL;
- unsigned long val = 0;
-
- if (len > rctx->max_resp_len) {
- ERR_raise(ERR_LIB_HTTP, HTTP_R_MAX_RESP_LEN_EXCEEDED);
- tag = ",max=";
- val = rctx->max_resp_len;
- }
- if (rctx->resp_len != 0 && rctx->resp_len != len) {
- ERR_raise(ERR_LIB_HTTP, HTTP_R_INCONSISTENT_CONTENT_LENGTH);
- tag = ",before=";
- val = rctx->resp_len;
- }
- if (tag != NULL) {
- char len_str[32];
- char str[32];
-
- BIO_snprintf(len_str, sizeof(len_str), "%lu", len);
- BIO_snprintf(str, sizeof(str), "%lu", val);
- ERR_add_error_data(4, "length=", len_str, tag, str);
- return 0;
- }
+ if (len > rctx->max_resp_len)
+ ERR_raise_data(ERR_LIB_HTTP, HTTP_R_MAX_RESP_LEN_EXCEEDED,
+ "length=%lu, max=%lu", len, rctx->max_resp_len);
+ if (rctx->resp_len != 0 && rctx->resp_len != len)
+ ERR_raise_data(ERR_LIB_HTTP, HTTP_R_INCONSISTENT_CONTENT_LENGTH,
+ "ASN.1 length=%lu, Content-Length=%lu",
+ len, rctx->resp_len);