6.0.0-git
2019-05-19

[#13843] CaseInsensitiveArray breaks HTTP Headers (?)
Summary CaseInsensitiveArray breaks HTTP Headers (?)
Queue Horde Framework Packages
Type Bug
State Resolved
Priority 1. Low
Owners jan (at) horde (dot) org
Requester jasper.olbrich (at) students (dot) uni-marbur (dot) gde
Created 2015-02-05 (1564 days ago)
Due
Updated 2015-02-06 (1563 days ago)
Assigned
Resolved 2015-02-06 (1563 days ago)
Milestone
Patch No

History
2015-02-06 13:58:14 Jan Schneider Assigned to Jan Schneider
State ⇒ Resolved
 
2015-02-06 13:58:01 Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit 9c10c85513f9908638153ed59ed67d44bca4532f
Author: Jan Schneider <jan@horde.org>
Date:   Fri Feb 6 14:57:46 2015 +0100

     Add request test and test for bug #13843.

  framework/Http/package.xml                       |    6 +-
  framework/Http/test/Horde/Http/CurlTest.php      |   61 +----------
  framework/Http/test/Horde/Http/FopenTest.php     |   73 +-------------
  framework/Http/test/Horde/Http/MockTest.php      |    6 +-
  framework/Http/test/Horde/Http/Peclhttp2Test.php |   61 +----------
  framework/Http/test/Horde/Http/PeclhttpTest.php  |   61 +----------
  framework/Http/test/Horde/Http/TestBase.php      |  124 
++++++++++++++++++++++
  7 files changed, 139 insertions(+), 253 deletions(-)

http://github.com/horde/horde/commit/9c10c85513f9908638153ed59ed67d44bca4532f
2015-02-06 13:57:55 Git Commit Comment #3 Reply to this comment
Changes have been made in Git (master):

commit e20bb811e89c8d4ba9741f12e6a74fb81eb05eee
Author: Jan Schneider <jan@horde.org>
Date:   Fri Feb 6 14:56:53 2015 +0100

     [jan] Make Horde_Http_Base_Response::headers array keys lowercase 
again (Bug #13843).

  framework/Http/lib/Horde/Http/Response/Base.php    |    2 +-
  .../Http/lib/Horde/Http/Response/Peclhttp.php      |    2 +-
  .../Http/lib/Horde/Http/Response/Peclhttp2.php     |    2 +-
  framework/Http/package.xml                         |    2 ++
  4 files changed, 5 insertions(+), 3 deletions(-)

http://github.com/horde/horde/commit/e20bb811e89c8d4ba9741f12e6a74fb81eb05eee
2015-02-06 11:55:48 piper (at) hrz (dot) uni-marburg (dot) de Comment #2
New Attachment: pear_php_Horde_Dav_Client.php.patch Download
Reply to this comment
this bug hinders at least the use of remote CalDAV-Calendars, because 
the function 'isCalDAV()' in kronolith/lib/Driver/Ical.php uses the 
function 'options()' from Sabre/DAV/Client.php, which makes dedicated 
use of lowercase header-key 'dav' (at lines 279 and 283). If the 
remote server hands-out uppercase header-keys, this results in not 
recognizing the remote calendar as CalDAV and therefore failing to 
find the remote events.

A workaround for this problem is, to force the returned headers to 
lowercase at Horde/Dav/Client.php, line 113, see attached patch.

Andreas
2015-02-05 16:17:46 jasper (dot) olbrich (at) students (dot) uni-marbur (dot) gde Comment #1
Type ⇒ Bug
State ⇒ Unconfirmed
Priority ⇒ 1. Low
Summary ⇒ CaseInsensitiveArray breaks HTTP Headers (?)
Queue ⇒ Horde Framework Packages
Milestone ⇒
Patch ⇒ No
Reply to this comment
Since this commit
https://github.com/horde/horde/commit/25a839f2bb73c3ab7eae5d14c9116e4ab7e54814
the HTTP headers are parsed/stored case-insensitively, but (as far as 
I can tell), the keys are stored in a case preserving way, so that 
finally $this->headers is case sensitive again.

This seems to break external CalDAV calendars, because in several 
places, lowercase header names are used as keys, for example
https://github.com/horde/horde/blob/a2eed2bb318770abe9621596be402d830275c129/framework/Dav/bundle/vendor/sabre/dav/lib/Sabre/DAV/Client.php#L276
and
https://github.com/horde/horde/blob/master/framework/Dav/lib/Horde/Dav/Client.php#L113

Installed versions are Horde 5.2.3 and Kronolith 4.2.4

Saved Queries