remodel file adding to accept paths, streams and plain data as upload files
[m6w6/ext-http] / php_http_filter.c
index 9dd0827d016b935cd5ec8c855d98433c6f9b2258..121966b86a6f7292a912d0fc77dc4822595cce59 100644 (file)
@@ -6,13 +6,11 @@
     | modification, are permitted provided that the conditions mentioned |
     | in the accompanying LICENSE file are met.                          |
     +--------------------------------------------------------------------+
-    | Copyright (c) 2004-2010, Michael Wallner <mike@php.net>            |
+    | Copyright (c) 2004-2011, Michael Wallner <mike@php.net>            |
     +--------------------------------------------------------------------+
 */
 
-/* $Id: http_filter_api.c 292841 2009-12-31 08:48:57Z mike $ */
-
-#include "php_http.h"
+#include "php_http_api.h"
 
 PHP_MINIT_FUNCTION(http_filter)
 {
@@ -403,13 +401,16 @@ static php_stream_filter *http_filter_create(const char *name, zval *params, int
                                        if (SUCCESS != zend_hash_find(HASH_OF(params), "flags", sizeof("flags"), (void *) &tmp)) {
                                                break;
                                        }
+                                       /* no break */
                                default:
                                {
                                        zval *num = php_http_ztyp(IS_LONG, *tmp);
                                        
                                        flags |= (Z_LVAL_P(num) & 0x0fffffff);
                                        zval_ptr_dtor(&num);
+
                                }
+                               break;
                        }
                }
                if ((b = php_http_encoding_stream_init(NULL, php_http_encoding_stream_get_deflate_ops(), flags TSRMLS_CC))) {