Doing optimizations when requesting 1k+ requests at once.

Comments

mikeytown2’s picture

This will need more testing. For now it will be left out of the patch

Line 1567

  // Parse the response status line.
  $status_line = trim(array_shift($response));
  // Get the protocol
  $pos_protocol = strpos($status_line, ' ');
  $result->protocol = substr($status_line, 0, $pos_protocol);
  // Get the code.
  $pos_code = strpos($status_line, ' ', $pos_protocol+1);
  $code = (int) substr($status_line, $pos_code, $pos_protocol);
  // If the response does not include a description, don't try to process it.
  $pos_message = strpos($status_line, ' ', $pos_code+1);
  $result->status_message = $pos_message !== FALSE ? substr($status_line, $pos_message) : '';
mikeytown2’s picture

Status: Active » Needs review
StatusFileSize
new6.94 KB

This also needs more testing...

mikeytown2’s picture

Status: Needs review » Fixed
StatusFileSize
new1.93 KB

I was conservative and only swapped in strlen were possible. Also fixed a bug with httprl_pr().

Following patch has been committed to 6.x & 7.x

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.