@@ 572-588 (lines=17) @@ | ||
569 | ||
570 | $payload = $req->payload; |
|
571 | // Deflate request body and set appropriate request headers |
|
572 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
573 | if ($this->request_compression == 'gzip') { |
|
574 | $a = @gzencode($payload); |
|
575 | if ($a) { |
|
576 | $payload = $a; |
|
577 | $encodingHdr = "Content-Encoding: gzip\r\n"; |
|
578 | } |
|
579 | } else { |
|
580 | $a = @gzcompress($payload); |
|
581 | if ($a) { |
|
582 | $payload = $a; |
|
583 | $encodingHdr = "Content-Encoding: deflate\r\n"; |
|
584 | } |
|
585 | } |
|
586 | } else { |
|
587 | $encodingHdr = ''; |
|
588 | } |
|
589 | ||
590 | // thanks to Grant Rauscher <[email protected]> for this |
|
591 | $credentials = ''; |
|
@@ 806-822 (lines=17) @@ | ||
803 | ||
804 | // Deflate request body and set appropriate request headers |
|
805 | $payload = $req->payload; |
|
806 | if (function_exists('gzdeflate') && ($this->request_compression == 'gzip' || $this->request_compression == 'deflate')) { |
|
807 | if ($this->request_compression == 'gzip') { |
|
808 | $a = @gzencode($payload); |
|
809 | if ($a) { |
|
810 | $payload = $a; |
|
811 | $encodingHdr = 'Content-Encoding: gzip'; |
|
812 | } |
|
813 | } else { |
|
814 | $a = @gzcompress($payload); |
|
815 | if ($a) { |
|
816 | $payload = $a; |
|
817 | $encodingHdr = 'Content-Encoding: deflate'; |
|
818 | } |
|
819 | } |
|
820 | } else { |
|
821 | $encodingHdr = ''; |
|
822 | } |
|
823 | ||
824 | if ($this->debug > 1) { |
|
825 | Logger::instance()->debugMessage("---SENDING---\n$payload\n---END---"); |