@@ 632-648 (lines=17) @@ | ||
629 | ||
630 | $payload = $req->payload; |
|
631 | // Deflate request body and set appropriate request headers |
|
632 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
633 | if ($this->request_compression == 'gzip') { |
|
634 | $a = @gzencode($payload); |
|
635 | if ($a) { |
|
636 | $payload = $a; |
|
637 | $encodingHdr = "Content-Encoding: gzip\r\n"; |
|
638 | } |
|
639 | } else { |
|
640 | $a = @gzcompress($payload); |
|
641 | if ($a) { |
|
642 | $payload = $a; |
|
643 | $encodingHdr = "Content-Encoding: deflate\r\n"; |
|
644 | } |
|
645 | } |
|
646 | } else { |
|
647 | $encodingHdr = ''; |
|
648 | } |
|
649 | ||
650 | // thanks to Grant Rauscher <[email protected]> for this |
|
651 | $credentials = ''; |
|
@@ 862-878 (lines=17) @@ | ||
859 | ||
860 | // Deflate request body and set appropriate request headers |
|
861 | $payload = $req->payload; |
|
862 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
863 | if ($this->request_compression == 'gzip') { |
|
864 | $a = @gzencode($payload); |
|
865 | if ($a) { |
|
866 | $payload = $a; |
|
867 | $encodingHdr = 'Content-Encoding: gzip'; |
|
868 | } |
|
869 | } else { |
|
870 | $a = @gzcompress($payload); |
|
871 | if ($a) { |
|
872 | $payload = $a; |
|
873 | $encodingHdr = 'Content-Encoding: deflate'; |
|
874 | } |
|
875 | } |
|
876 | } else { |
|
877 | $encodingHdr = ''; |
|
878 | } |
|
879 | ||
880 | if ($this->debug > 1) { |
|
881 | Logger::instance()->debugMessage("---SENDING---\n$payload\n---END---"); |