| @@ 1249-1273 (lines=25) @@ | ||
| 1246 | ||
| 1247 | $payload = $msg->payload; |
|
| 1248 | // Deflate request body and set appropriate request headers |
|
| 1249 | if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) |
|
| 1250 | { |
|
| 1251 | if($this->request_compression == 'gzip') |
|
| 1252 | { |
|
| 1253 | $a = @gzencode($payload); |
|
| 1254 | if($a) |
|
| 1255 | { |
|
| 1256 | $payload = $a; |
|
| 1257 | $encoding_hdr = "Content-Encoding: gzip\r\n"; |
|
| 1258 | } |
|
| 1259 | } |
|
| 1260 | else |
|
| 1261 | { |
|
| 1262 | $a = @gzcompress($payload); |
|
| 1263 | if($a) |
|
| 1264 | { |
|
| 1265 | $payload = $a; |
|
| 1266 | $encoding_hdr = "Content-Encoding: deflate\r\n"; |
|
| 1267 | } |
|
| 1268 | } |
|
| 1269 | } |
|
| 1270 | else |
|
| 1271 | { |
|
| 1272 | $encoding_hdr = ''; |
|
| 1273 | } |
|
| 1274 | ||
| 1275 | // thanks to Grant Rauscher <[email protected]> for this |
|
| 1276 | $credentials=''; |
|
| @@ 1476-1500 (lines=25) @@ | ||
| 1473 | ||
| 1474 | // Deflate request body and set appropriate request headers |
|
| 1475 | $payload = $msg->payload; |
|
| 1476 | if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) |
|
| 1477 | { |
|
| 1478 | if($this->request_compression == 'gzip') |
|
| 1479 | { |
|
| 1480 | $a = @gzencode($payload); |
|
| 1481 | if($a) |
|
| 1482 | { |
|
| 1483 | $payload = $a; |
|
| 1484 | $encoding_hdr = 'Content-Encoding: gzip'; |
|
| 1485 | } |
|
| 1486 | } |
|
| 1487 | else |
|
| 1488 | { |
|
| 1489 | $a = @gzcompress($payload); |
|
| 1490 | if($a) |
|
| 1491 | { |
|
| 1492 | $payload = $a; |
|
| 1493 | $encoding_hdr = 'Content-Encoding: deflate'; |
|
| 1494 | } |
|
| 1495 | } |
|
| 1496 | } |
|
| 1497 | else |
|
| 1498 | { |
|
| 1499 | $encoding_hdr = ''; |
|
| 1500 | } |
|
| 1501 | ||
| 1502 | if($this->debug > 1) |
|
| 1503 | { |
|