{{info}}
{{msg}}
  
  1. );
  2. $redis=\rap\cache\Cache::redis();
  3. if($redis){
  4. $redis->select(1);
  5. }
  6. $errArr = \rap\cache\Cache::get('curl_error');
  7. if(!$errArr) $errArr = [];
  8. $errArr [] = ['url'=>$url,'time'=>time()];
  9. \rap\cache\Cache::set('curl_error',$errArr);
  10. throw new Requests_Exception($error, 'curlerror', $this->handle);
  11. }
  12. $this->info = curl_getinfo($this->handle);
  13. $options['hooks']->dispatch('curl.after_request', array(&$this->headers, &$this->info));
  14. return $this->headers;
  15. }
  16. /**
  17. * Collect the headers as they are received
  18. *
  19. * @param resource $handle cURL resource
  20. * @param string $headers Header string
  21. * @return integer Length of provided header
  22. */
  23. public function stream_headers($handle, $headers) {
  24. // Why do we do this? cURL will send both the final response and any
  25. // interim responses, such as a 100 Continue. We don't need that.
  26. // (We may want to keep this somewhere just in case)
  27. if ($this->done_headers) {
  28. $this->headers = '';
  29. $this->done_headers = false;
  30. }
  31. $this->headers .= $headers;
  32. if ($headers === "\r\n") {
  33. $this->done_headers = true;
  34. }
  35. return strlen($headers);
  36. }
trace调用栈
    
  1. Requests_Transport_cURL->process_response(...)
  2. Requests_Transport_cURL->request(...)
  3. Requests::request(...)
  4. Requests::get(...)
  5. app\consultant\service\ConsultantService->houseConsultantShow(...)
  6. app\house\pc\controller\NewsController->home(...)
  7. ReflectionMethod->invokeArgs(...)
  8. rap\web\mvc\HandlerAdapter->invokeRequest(...)
  9. rap\web\mvc\ControllerHandlerAdapter->handle(...)
  10. rap\web\mvc\Dispatcher->doDispatch(...)
  11. rap\web\Application->start(...)
  12. require(...)