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

Description

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

My fix:


        $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')
        ) {

Comments

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.

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