SimplePie_Content_Type_Sniffer::text_or_binary

Advertisement

Summery Summery

Sniff text or binary

Syntax Syntax

SimplePie_Content_Type_Sniffer::text_or_binary()

Return Return

(string) Actual Content-Type

Source Source

File: wp-includes/SimplePie/Content/Type/Sniffer.php

			return 'text/plain';
		}
		elseif (preg_match('/[\x00-\x08\x0E-\x1A\x1C-\x1F]/', $this->file->body))
		{
			return 'application/octect-stream';
		}

		return 'text/plain';
	}

	/**
	 * Sniff unknown
	 *
	 * @return string Actual Content-Type
	 */
	public function unknown()
	{
		$ws = strspn($this->file->body, "\x09\x0A\x0B\x0C\x0D\x20");

Advertisement

Advertisement

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.