X-Git-Url: https://git.m6w6.name/?p=m6w6%2Fext-http;a=blobdiff_plain;f=http_api.c;h=e71b0879955cc66d120517f00ece623310a16138;hp=61de3e81f1448d352c367d8596a145b1f597215e;hb=976c6c8c58c93c4ab74e9c23e1cf5b31b2b1bd78;hpb=6c4a552c1ad7b0018afb57a3d0028c2be166a30a diff --git a/http_api.c b/http_api.c index 61de3e8..e71b087 100644 --- a/http_api.c +++ b/http_api.c @@ -17,6 +17,7 @@ #include "php_output.h" #include "ext/standard/url.h" +#include "ext/standard/php_lcg.h" #include "php_http_api.h" #include "php_http_send_api.h" @@ -94,6 +95,13 @@ char *_http_pretty_key(char *key, size_t key_len, zend_bool uctitle, zend_bool x } /* }}} */ +/* {{{ http_boundary(char *, size_t) */ +size_t _http_boundary(char *buf, size_t buf_len TSRMLS_DC) +{ + return snprintf(buf, buf_len, "%lu%0.9f", (ulong) HTTP_G->request.time, (float) php_combined_lcg(TSRMLS_C)); +} +/* }}} */ + /* {{{ void http_error(long, long, char*) */ void _http_error_ex(long type TSRMLS_DC, long code, const char *format, ...) {