- some housekeeping
[m6w6/ext-http] / http_send_api.c
index 62660359026f03581012666a8a1add9101dae87a..0db19b36a9c509640b7ff644fd46c21208eda75e 100644 (file)
 
 /* $Id$ */
 
-#ifdef HAVE_CONFIG_H
-#      include "config.h"
-#endif
-
+#define HTTP_WANT_SAPI
 #define HTTP_WANT_ZLIB
 #define HTTP_WANT_MAGIC
 #include "php_http.h"
 
-#include "SAPI.h"
 #include "php_streams.h"
 #include "ext/standard/php_lcg.h"
 
@@ -363,7 +359,7 @@ PHP_HTTP_API STATUS _http_send_ex(const void *data_ptr, size_t data_size, http_s
                                        char boundary_str[32], range_header_str[256];
                                        size_t boundary_len, range_header_len;
                                        
-                                       boundary_len = snprintf(boundary_str, lenof(boundary_str), "%lu%0.9f", (ulong) time(NULL), (float) php_combined_lcg(TSRMLS_C));
+                                       boundary_len = snprintf(boundary_str, lenof(boundary_str), "%lu%0.9f", (ulong) HTTP_GET_REQUEST_TIME(), (float) php_combined_lcg(TSRMLS_C));
                                        range_header_len = snprintf(range_header_str, lenof(range_header_str), "Content-Type: multipart/byteranges; boundary=%s", boundary_str);
                                        
                                        http_send_status_header_ex(206, range_header_str, range_header_len, 1);