Working on #278425-55: Using basename() is not locale safe

Details http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

   protected function curlHeaderCallback($curlHandler, $header) {
-    $this->headers[] = $header;
+    // Headers could be splited on chunks so prepending last header line if
+    // current header has no colon (":"). Additional details could be found
+    // in rfc2616 http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
+    if (strpos($header, ':') === FALSE) {
+      $this->headers[] = array_pop($this->headers) . $header;
+    }
+    else {
+      $this->headers[] = $header;
+    }
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

andypost’s picture

Status: Needs work » Needs review
FileSize
895 bytes

Patch

andypost’s picture

There should special check for HTTP/ headerstrpos($header, 'HTTP/') !== 0

andypost’s picture

We need detect
- start of headers "HTTP/"
- end of headers ""
- chunks "lines without colons

andypost’s picture

Suppose it's a last patch

boombatower’s picture

Project: SimpleTest » Drupal core
Version: 6.x-2.x-dev » 8.x-dev
Component: Code » simpletest.module
andypost’s picture

Project: Drupal core » SimpleTest
Version: 8.x-dev » 6.x-2.x-dev
Component: simpletest.module » Code

There's a patch already for core D7 #278425-66: Using basename() is not locale safe

This bug should be fixed in simpletest module also

boombatower’s picture

Status: Needs review » Closed (duplicate)