ZF-10539: Content-Type check in Subscriber_Callback's handle-method fails

Issue Type: Bug Created: 2010-10-10T02:14:35.000+0000 Last Updated: 2010-10-10T05:30:32.000+0000 Status: Resolved Fix version(s): - 1.11.1 (30/Nov/10)

Reporter: Patrick Günther (patrickg) Assignee: Pádraic Brady (padraic) Tags: - Zend_Feed_Pubsubhubbub

Related issues: Attachments:


Some Hubs (i.e.: PuSHPress) send the Content-Type with charset (e.g.: application/rss+xml; charset=UTF-8).

My fix:

<pre class="highlight">
        $contentType = str_replace(' ', '', strtolower($this->_getHeader('Content-Type')));
        if (false !== ($pos = strpos($contentType, ';charset='))) {
            $contentType = substr($contentType, 0, $pos);
        if (strtolower($_SERVER['REQUEST_METHOD']) == 'post'
            && $this->_hasValidVerifyToken(null, false)
            && ($contentType == 'application/atom+xml'
                || $contentType == 'application/rss+xml'
                || $contentType == 'application/xml'
                || $contentType == 'text/xml'
                || $contentType == 'application/rdf+xml')
        ) {


Posted by Pádraic Brady (padraic) on 2010-10-10T03:58:58.000+0000

Thanks for the report. Used a slightly different fix to leave anything after MIME open ended rather than trying to predict it. Fixed in r23069 in trunk - will be in the next release.

Posted by Patrick Günther (patrickg) on 2010-10-10T05:30:31.000+0000

Since you are about to fix this component. Can you fix this bug too?

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.