]> granicus.if.org Git - php/commitdiff
Compression level shouldn't be greatr then 9.
authorDmitry Stogov <dmitry@php.net>
Tue, 7 Feb 2006 12:57:43 +0000 (12:57 +0000)
committerDmitry Stogov <dmitry@php.net>
Tue, 7 Feb 2006 12:57:43 +0000 (12:57 +0000)
ext/soap/php_http.c

index b8c5f05b90f1cdc9b4e7428c3e568d7c67e9bec7..072c812e5d28a763c5eb787d49b5eea743076447 100644 (file)
@@ -250,6 +250,8 @@ int make_http_soap_request(zval  *this_ptr,
                int level = Z_LVAL_PP(tmp) & 0x0f;
                int kind  = Z_LVAL_PP(tmp) & SOAP_COMPRESSION_DEFLATE;
 
+               if (level > 9) {level = 9;}
+
          if ((Z_LVAL_PP(tmp) & SOAP_COMPRESSION_ACCEPT) != 0) {
                        smart_str_append_const(&soap_headers_z,"Accept-Encoding: gzip, deflate\r\n");
          }