/** * HTTP API: WP_Http_Encoding class * * @package WordPress * @subpackage HTTP * @since 4.4.0 */ /** * Core class used to implement deflate and gzip transfer encoding support for HTTP requests. * * Includes RFC 1950, RFC 1951, and RFC 1952. * * @since 2.8.0 */ class WP_Http_Encoding { /** * Compress raw string using the deflate format. * * Supports the RFC 1951 standard. * * @since 2.8.0 * * @static * * @param string $raw String to compress. * @param int $level Optional, default is 9. Compression level, 9 is highest. * @param string $supports Optional, not used. When implemented it will choose the right compression based on what the server supports. * @return string|false False on failure. */ public static function compress( $raw, $level = 9, $supports = null ) { return gzdeflate( $raw, $level ); } /** * Decompression of deflated string. * * Will attempt to decompress using the RFC 1950 standard, and if that fails * then the RFC 1951 standard deflate will be attempted. Finally, the RFC * 1952 standard gzip decode will be attempted. If all fail, then the * original compressed string will be returned. * * @since 2.8.0 * * @static * * @param string $compressed String to decompress. * @param int $length The optional length of the compressed data. * @return string|bool False on failure. */ public static function decompress( $compressed, $length = null ) { if ( empty($compressed) ) return $compressed; if ( false !== ( $decompressed = @gzinflate( $compressed ) ) ) return $decompressed; if ( false !== ( $decompressed = self::compatible_gzinflate( $compressed ) ) ) return $decompressed; if ( false !== ( $decompressed = @gzuncompress( $compressed ) ) ) return $decompressed; if ( function_exists('gzdecode') ) { $decompressed = @gzdecode( $compressed ); if ( false !== $decompressed ) return $decompressed; } return $compressed; } /** * Decompression of deflated string while staying compatible with the majority of servers. * * Certain Servers will return deflated data with headers which PHP's gzinflate() * function cannot handle out of the box. The following function has been created from * various snippets on the gzinflate() PHP documentation. * * Warning: Magic numbers within. Due to the potential different formats that the compressed * data may be returned in, some "magic offsets" are needed to ensure proper decompression * takes place. For a simple progmatic way to determine the magic offset in use, see: * https://core.trac.wordpress.org/ticket/18273 * * @since 2.8.1 * @link https://core.trac.wordpress.org/ticket/18273 * @link https://secure.php.net/manual/en/function.gzinflate.php#70875 * @link https://secure.php.net/manual/en/function.gzinflate.php#77336 * * @static * * @param string $gzData String to decompress. * @return string|bool False on failure. */ public static function compatible_gzinflate($gzData) { // Compressed data might contain a full header, if so strip it for gzinflate(). if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) { $i = 10; $flg = ord( substr($gzData, 3, 1) ); if ( $flg > 0 ) { if ( $flg & 4 ) { list($xlen) = unpack('v', substr($gzData, $i, 2) ); $i = $i + 2 + $xlen; } if ( $flg & 8 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 16 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 2 ) $i = $i + 2; } $decompressed = @gzinflate( substr($gzData, $i, -8) ); if ( false !== $decompressed ) return $decompressed; } // Compressed data from java.util.zip.Deflater amongst others. $decompressed = @gzinflate( substr($gzData, 2) ); if ( false !== $decompressed ) return $decompressed; return false; } /** * What encoding types to accept and their priority values. * * @since 2.8.0 * * @static * * @param string $url * @param array $args * @return string Types of encoding to accept. */ public static function accept_encoding( $url, $args ) { $type = array(); $compression_enabled = self::is_available(); if ( ! $args['decompress'] ) // Decompression specifically disabled. $compression_enabled = false; elseif ( $args['stream'] ) // Disable when streaming to file. $compression_enabled = false; elseif ( isset( $args['limit_response_size'] ) ) // If only partial content is being requested, we won't be able to decompress it. $compression_enabled = false; if ( $compression_enabled ) { if ( function_exists( 'gzinflate' ) ) $type[] = 'deflate;q=1.0'; if ( function_exists( 'gzuncompress' ) ) $type[] = 'compress;q=0.5'; if ( function_exists( 'gzdecode' ) ) $type[] = 'gzip;q=0.5'; } /** * Filters the allowed encoding types. * * @since 3.6.0 * * @param array $type Encoding types allowed. Accepts 'gzinflate', * 'gzuncompress', 'gzdecode'. * @param string $url URL of the HTTP request. * @param array $args HTTP request arguments. */ $type = apply_filters( 'wp_http_accept_encoding', $type, $url, $args ); return implode(', ', $type); } /** * What encoding the content used when it was compressed to send in the headers. * * @since 2.8.0 * * @static * * @return string Content-Encoding string to send in the header. */ public static function content_encoding() { return 'deflate'; } /** * Whether the content be decoded based on the headers. * * @since 2.8.0 * * @static * * @param array|string $headers All of the available headers. * @return bool */ public static function should_decode($headers) { if ( is_array( $headers ) ) { if ( array_key_exists('content-encoding', $headers) && ! empty( $headers['content-encoding'] ) ) return true; } elseif ( is_string( $headers ) ) { return ( stripos($headers, 'content-encoding:') !== false ); } return false; } /** * Whether decompression and compression are supported by the PHP version. * * Each function is tested instead of checking for the zlib extension, to * ensure that the functions all exist in the PHP version and aren't * disabled. * * @since 2.8.0 * * @static * * @return bool */ public static function is_available() { return ( function_exists('gzuncompress') || function_exists('gzdeflate') || function_exists('gzinflate') ); } } Past Events
Loading Events
Find Events

Event Views Navigation

Past Events

Events List Navigation

April 2012

Session v1: The Biblical Worldview

April 19, 2012 - April 21, 2012
Hotel Soechi Medan, Jalan Cirebon No. 76A
Medan, Sumut Indonesia

Join LT Jeyachandran as he discusses about what biblical worldview is and how it impacts into our lives. Whether when we are operating in our culture, working in our workplace or living our Christian identities, we are aware of the challenges in integrating our faith.

Find out more »
September 2012

Session v2: Relationships and the Call to Christlikeness

September 27, 2012 - September 29, 2012
YP Winfield, Jl. HM Yamin No.16
Medan, SUMUT Indonesia

We live in information age, where we are increasingly connected. Ironically, this is also an age where we can be closer to people that are standing miles away than people who are eating at the same table with us. This is a generation that is increasingly bombarded with information, but at the same time increasingly lonely. How can we put a brake on our incessant obsession with information? How do we find the life giving relationships we need? How do…

Find out more »
September 2014

Session v3: From the Garden to a City

September 6, 2014 - September 7, 2014
Wesley Church, Jalan Sultan Agung No. 9
Medan, Sumut Indonesia

What can the Bible and Christian faith teach us about our work? Are we supposed to separate our faith and our vocation? How can we look at our professional life in the light of God’s kingdom in the world? Can will live out our faith in the context of our vocation? Join us for in-depth look at how Christian can better integrate faith in the working life.

Find out more »
March 2015

Session v4: Leadership

March 20, 2015
UPH Medan, Room 501 Level 5 Lippo Plaza Medan Jl. Imam Bonjol No.6

Bible Study: Christian Leadership Being Christians impacts the way we behave as leaders in the marketplace. A Christian should go beyond rules and hierarchy in the way he relates to his surroundings. How does one then apply Christian principles to the way he leads? Whether you are leading in the field of education, church, business, art, family and everything else, you will find LT’s teachings helpful in developing your leadership skills. Join us for the study! Date/Time: 19th and 20th…

Find out more »

Session v4: Trinity

March 21, 2015
UPH Medan, Room 501 Level 5 Lippo Plaza Medan Jl. Imam Bonjol No.6

The Trinity is one of the most important foundations of our Christian faith. However, many Christians fail to recognize the Trinity’s relevance to their faith and life. In essence, they were living as functional Unitarians. The understanding of Trinity is crucial for a person’s spiritual growth as it brings many important aspects in Christianity in a coherent manner. C.S.Lewis, one of the great Christian writers in our era, said “I believe in Christianity as I believe that the sun has…

Find out more »
July 2015

Session v5: Common Grace

July 16, 2015 @ 6:15 pm - July 17, 2015 @ 9:15 pm
UPH Medan, Room 501 Level 5 Lippo Plaza Medan Jl. Imam Bonjol No.6

– Common Grace, Work and Apologetics This session focuses on the theology of common grace and its implications for work and apologetics (how one defends the faith). Particularly, how does Scripture characterise the good that unbelievers do apart from an explicit faith in Christ, and how does one live in a world where belief in Christ (or God) is more and more seen as unnecessary for the flourishing of life? – The Gospel and Race The Gospel has implications for…

Find out more »
November 2015

Session v6: Worship

November 17, 2015 - November 18, 2015
Clapham Collective, Komplek Ruko Medan Centerpoint, Jalan Timor Blok G No.3/4
Medan, Sumut Indonesia

Join us for our first session delivered in Indonesian! For the last few sessions, we have the privilege of wrestling hard truths and their application in our life. In this session we will look at how worship plays a critical role in our spiritual life and the importance of discerning when we deliver the gospel. We have known Jimmy for few years, and we are delighted to host him here! Register here: https://www.eventbrite.com/e/harvestrs-session-v6-tickets-19508443279 Following is the description. The Role of…

Find out more »
April 2016
IDR75000 - IDR150000

Session v7: Spiritual Formation

April 26, 2016 - April 27, 2016
Clapham Collective, Komplek Ruko Medan Centerpoint, Jalan Timor Blok G No.3/4
Medan, Sumut Indonesia

  The Turn To Experience 26 April 2016, 17.00 – 21.00 Rasionalitas atau pengalaman? Bagaimana gereja bisa mengerti konteks dan mendengar suara dari generasi muda yang akan mewarisi gereja kita di masa yang akan datang? Sesi ini ditujukan kepada majelis gereja, aktivis, pelayan, hamba Tuhan, dan pengurus. Sesi ini akan membawa implikasi ke ibadah, doa dan pembacaan Alkitab kita. Coming to the Presence of God 27 April 2016, 16.00 – 21.00 Mari kita menggali lebih dalam lagi ke dalam hati kita, apakah kita rindu akan hadirat Tuhan? Atau hidup kita hanya untuk diri kita sendiri? Mari segarkan kerohanian kita. Mari datang bersama ke hadapan Tuhan, sebagai anak-anakNya yang mencari dan terkadang kering di dalam perjalanan kita.  

Find out more »
June 2016
IDR50,000

Session v8: Disciple Making

June 16, 2016 @ 4:00 pm - 9:00 pm
Clapham Collective, Komplek Ruko Medan Centerpoint, Jalan Timor Blok G No.3/4
Medan, Sumut Indonesia

Listening to some of our fellow workers, there is one glaring need that many churches have overlooked. We have noticed that in the midst of the hectic church program, there is one thing that we have missed: discipleship. Sure, there are Sunday Service, youth fellowship, sending mission, and the choir. All of them are important. However, a church cannot be sustained without its people. How can you expect the church to flourish while ignoring the very Great Commission that our…

Find out more »
August 2016
IDR50,000

Session v9: Faith, Identity, and Work

August 2, 2016 - August 3, 2016
Clapham Collective, Komplek Ruko Medan Centerpoint, Jalan Timor Blok G No.3/4
Medan, Sumut Indonesia

Session 1 In Search of Identity: Considering God’s Blueprint for Humanity WHO AM I? WHO ARE WE? 7pm – 9pm Session 2 Community and Identity: Being the Church Wherever We Are WHO OR WHAT IS THE CHURCH? 4pm – 6pm Session 3 Hope and Identity: The Courage to Model the Kingdom of God IS THE KINGDOM OF GOD ALREADY HERE? 7pm – 9pm

Find out more »
+ Export Events