| @@ 648-662 (lines=15) @@ | ||
| 645 | $payload = $req->payload; |
|
| 646 | // Deflate request body and set appropriate request headers |
|
| 647 | $encodingHdr = ''; |
|
| 648 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
| 649 | if ($this->request_compression == 'gzip') { |
|
| 650 | $a = @gzencode($payload); |
|
| 651 | if ($a) { |
|
| 652 | $payload = $a; |
|
| 653 | $encodingHdr = "Content-Encoding: gzip\r\n"; |
|
| 654 | } |
|
| 655 | } else { |
|
| 656 | $a = @gzcompress($payload); |
|
| 657 | if ($a) { |
|
| 658 | $payload = $a; |
|
| 659 | $encodingHdr = "Content-Encoding: deflate\r\n"; |
|
| 660 | } |
|
| 661 | } |
|
| 662 | } |
|
| 663 | ||
| 664 | // thanks to Grant Rauscher <[email protected]> for this |
|
| 665 | $credentials = ''; |
|
| @@ 881-897 (lines=17) @@ | ||
| 878 | ||
| 879 | // Deflate request body and set appropriate request headers |
|
| 880 | $payload = $req->payload; |
|
| 881 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
| 882 | if ($this->request_compression == 'gzip') { |
|
| 883 | $a = @gzencode($payload); |
|
| 884 | if ($a) { |
|
| 885 | $payload = $a; |
|
| 886 | $encodingHdr = 'Content-Encoding: gzip'; |
|
| 887 | } |
|
| 888 | } else { |
|
| 889 | $a = @gzcompress($payload); |
|
| 890 | if ($a) { |
|
| 891 | $payload = $a; |
|
| 892 | $encodingHdr = 'Content-Encoding: deflate'; |
|
| 893 | } |
|
| 894 | } |
|
| 895 | } else { |
|
| 896 | $encodingHdr = ''; |
|
| 897 | } |
|
| 898 | ||
| 899 | if ($this->debug > 1) { |
|
| 900 | Logger::instance()->debugMessage("---SENDING---\n$payload\n---END---"); |
|