| @@ 1272-1296 (lines=25) @@ | ||
| 1269 | ||
| 1270 | $payload = $msg->payload; |
|
| 1271 | // Deflate request body and set appropriate request headers |
|
| 1272 | if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate'))
|
|
| 1273 | {
|
|
| 1274 | if($this->request_compression == 'gzip') |
|
| 1275 | {
|
|
| 1276 | $a = @gzencode($payload); |
|
| 1277 | if($a) |
|
| 1278 | {
|
|
| 1279 | $payload = $a; |
|
| 1280 | $encoding_hdr = "Content-Encoding: gzip\r\n"; |
|
| 1281 | } |
|
| 1282 | } |
|
| 1283 | else |
|
| 1284 | {
|
|
| 1285 | $a = @gzcompress($payload); |
|
| 1286 | if($a) |
|
| 1287 | {
|
|
| 1288 | $payload = $a; |
|
| 1289 | $encoding_hdr = "Content-Encoding: deflate\r\n"; |
|
| 1290 | } |
|
| 1291 | } |
|
| 1292 | } |
|
| 1293 | else |
|
| 1294 | {
|
|
| 1295 | $encoding_hdr = ''; |
|
| 1296 | } |
|
| 1297 | ||
| 1298 | // thanks to Grant Rauscher <[email protected]> for this |
|
| 1299 | $credentials=''; |
|
| @@ 1502-1526 (lines=25) @@ | ||
| 1499 | ||
| 1500 | // Deflate request body and set appropriate request headers |
|
| 1501 | $payload = $msg->payload; |
|
| 1502 | if(function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate'))
|
|
| 1503 | {
|
|
| 1504 | if($this->request_compression == 'gzip') |
|
| 1505 | {
|
|
| 1506 | $a = @gzencode($payload); |
|
| 1507 | if($a) |
|
| 1508 | {
|
|
| 1509 | $payload = $a; |
|
| 1510 | $encoding_hdr = 'Content-Encoding: gzip'; |
|
| 1511 | } |
|
| 1512 | } |
|
| 1513 | else |
|
| 1514 | {
|
|
| 1515 | $a = @gzcompress($payload); |
|
| 1516 | if($a) |
|
| 1517 | {
|
|
| 1518 | $payload = $a; |
|
| 1519 | $encoding_hdr = 'Content-Encoding: deflate'; |
|
| 1520 | } |
|
| 1521 | } |
|
| 1522 | } |
|
| 1523 | else |
|
| 1524 | {
|
|
| 1525 | $encoding_hdr = ''; |
|
| 1526 | } |
|
| 1527 | ||
| 1528 | if($this->debug > 1) |
|
| 1529 | {
|
|