etag test & fixes; set default etag mode for temp streams to crc32(b)
[m6w6/ext-http] / php_http_buffer.c
index 84e5bbdc39d6f592aa1fd29969a7cd7fdb955738..5a3927e17cfc7dc9071641fc2d68da5d65ca6e75 100644 (file)
@@ -1,13 +1,22 @@
-
-/* $Id: php_http_buffer_t.c 211942 2006-04-24 17:17:09Z mike $ */
-
-#include "php.h"
+/*
+    +--------------------------------------------------------------------+
+    | PECL :: http                                                       |
+    +--------------------------------------------------------------------+
+    | Redistribution and use in source and binary forms, with or without |
+    | modification, are permitted provided that the conditions mentioned |
+    | in the accompanying LICENSE file are met.                          |
+    +--------------------------------------------------------------------+
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
+    +--------------------------------------------------------------------+
+*/
+
+#include <php.h>
 #include "php_http_buffer.h"
 
 PHP_HTTP_BUFFER_API php_http_buffer_t *php_http_buffer_init_ex(php_http_buffer_t *buf, size_t chunk_size, int flags)
 {
        if (!buf) {
-               buf = pemalloc(sizeof(php_http_buffer_t), flags & PHP_HTTP_BUFFER_INIT_PERSISTENT);
+               buf = pemalloc(sizeof(*buf), flags & PHP_HTTP_BUFFER_INIT_PERSISTENT);
        }
 
        if (buf) {