(&self)
| 129 | } |
| 130 | |
| 131 | fn hook_curl_setopt_array(&self) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) { |
| 132 | ( |
| 133 | Box::new(|_, execute_data| { |
| 134 | validate_num_args(execute_data, 2)?; |
| 135 | |
| 136 | let cid = Self::get_resource_id(execute_data)?; |
| 137 | |
| 138 | if let Some(opts) = execute_data.get_parameter(1).as_z_arr() { |
| 139 | if let Some(value) = opts.get(CURLOPT_HTTPHEADER as u64) { |
| 140 | CURL_HEADERS |
| 141 | .with(|headers| headers.borrow_mut().insert(cid, value.clone())); |
| 142 | } |
| 143 | } |
| 144 | |
| 145 | Ok(Box::new(())) |
| 146 | }), |
| 147 | Noop::noop(), |
| 148 | ) |
| 149 | } |
| 150 | |
| 151 | fn hook_curl_exec(&self) -> (Box<BeforeExecuteHook>, Box<AfterExecuteHook>) { |
| 152 | ( |
no test coverage detected