- servers may return a header multiple times, join them in http_message_header()
[m6w6/ext-http] / http_api.c
index 78745ee9d0083082bf1e6095b735b081a3bb4abb..f8f93e161b3364b772fcf0896bfc1f01382d0d34 100644 (file)
@@ -212,7 +212,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header
 {
        if (    (send_header && (SUCCESS != http_send_status_header(status, header))) ||
                        (status && (SUCCESS != http_send_status(status)))) {
-               http_error_ex(HE_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, header ? header : "");
+               http_error_ex(HE_WARNING, HTTP_E_HEADER, "Failed to exit with status/header: %d - %s", status, STR_PTR(header));
                STR_FREE(header);
                STR_FREE(body);
                return FAILURE;