Summary | Free/Busy character set information ignored |
Queue | Horde Framework Packages |
Type | Bug |
State | Resolved |
Priority | 1. Low |
Owners | jan (at) horde (dot) org, slusarz (at) horde (dot) org |
Requester | skhorde (at) smail (dot) inf (dot) fh-bonn-rhein-sieg (dot) de |
Created | 12/04/2014 (3881 days ago) |
Due | |
Updated | 12/05/2014 (3880 days ago) |
Assigned | 12/04/2014 (3881 days ago) |
Resolved | 12/05/2014 (3880 days ago) |
Github Issue Link | |
Github Pull Request | |
Milestone | |
Patch | No |
State ⇒ Resolved
Queue ⇒ Horde Framework Packages
Assigned to Jan Schneider
Assigned to Michael Slusarz
State ⇒ Feedback
Leaving open for Jan to look at, since he knows Horde_Http code better
than I do.
commit 25a839f2bb73c3ab7eae5d14c9116e4ab7e54814
Author: Michael M Slusarz <slusarz@horde.org>
Date: Thu Dec 4 11:24:25 2014 -0700
[mms] Horde_Http_Base_Response#getHeader() is now
case-insensitive for the header input (
Bug #13736).framework/Http/lib/Horde/Http/Response/Base.php | 45 ++++++++++++-------
.../Http/lib/Horde/Http/Response/Peclhttp.php | 7 ++-
.../Http/lib/Horde/Http/Response/Peclhttp2.php | 7 ++-
framework/Http/package.xml | 4 +-
4 files changed, 38 insertions(+), 25 deletions(-)
http://github.com/horde/horde/commit/25a839f2bb73c3ab7eae5d14c9116e4ab7e54814
* 'Content-Length', etc.). This is case
sensitive.
insensitive.
We have Horde_Support_CaseInsensitiveArray to handle this, for example.
Priority ⇒ 1. Low
Type ⇒ Bug
Summary ⇒ Free/Busy character set information ignored
Queue ⇒ Kronolith
Milestone ⇒
Patch ⇒ No
State ⇒ Unconfirmed
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.