[Tickets #13736] Free/Busy character set information ignored

noreply at bugs.horde.org noreply at bugs.horde.org
Thu Dec 4 09:22:17 UTC 2014


DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.

Ticket URL: https://bugs.horde.org/ticket/13736
------------------------------------------------------------------------------
  Ticket             | 13736
  Created By         | skhorde at smail.inf.fh-bonn-rhein-sieg.de
  Summary            | Free/Busy character set information ignored
  Queue              | Kronolith
  Version            | 4.2.4
  Type               | Bug
  State              | Unconfirmed
  Priority           | 1. Low
  Milestone          |
  Patch              |
  Owners             |
------------------------------------------------------------------------------


skhorde at smail.inf.fh-bonn-rhein-sieg.de (2014-12-04 09:22) wrote:

FreeBusy.php uses the Horde Http Client class to retrieve information  
and queries the content type with

lib/FreeBusy.php:188
             if ($response->code == 200 && $data = $response->getBody()) {
                 // Detect the charset of the iCalendar data.
                 $contentType = $response->getHeader('Content-Type');

However, the parameter to getHeader() is case-sensitive _and_  
lower-case, see below.

Horde_Http_Response_Base:

/**
      * Returns the value of a single response header.
      *
      * @param string $header  Header name to get ('Content-Type',
      *                        'Content-Length', etc.). This is case sensitive.
      *
      * @return string HTTP header value.
      */
     public function getHeader($header)

in function _parseHeaders() line 82

             if (preg_match('|^([\w-]+):\s+(.+)|', $headerLine, $m)) {
                 unset($lastHeader);
                 $headerName = strtolower($m[1]);

====

So either it's a bug in getHeader(), because it does not lower-case  
the header name, or FreeBusy.php need to request the lower-case header  
name and the documentation of getHeader() should reflect it, too.





More information about the bugs mailing list