- missing include
[m6w6/ext-http] / http_api.c
index 71112618763859b1e68722515dc34acf2ec29a20..999826dfa7af7a6c89bc8bf72e27519ef1d0063c 100644 (file)
@@ -22,6 +22,7 @@
 
 #include "SAPI.h"
 #include "ext/standard/url.h"
 
 #include "SAPI.h"
 #include "ext/standard/url.h"
+#include "ext/standard/head.h"
 
 #include "php_http.h"
 #include "php_http_std_defs.h"
 
 #include "php_http.h"
 #include "php_http_std_defs.h"
@@ -220,7 +221,7 @@ STATUS _http_exit_ex(int status, char *header, char *body, zend_bool send_header
                }
        }
        
                }
        }
        
-       if (body) {
+       if (php_header(TSRMLS_C) && body) {
                PHPWRITE(body, strlen(body));
        }
        
                PHPWRITE(body, strlen(body));
        }