Code Duplication    Length = 7-7 lines in 2 locations

lib/private/files/storage/dav.php 2 locations

@@ 354-360 (lines=7) @@
351
				if(defined('CURLOPT_REDIR_PROTOCOLS')) {
352
					curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS, CURLPROTO_HTTP | CURLPROTO_HTTPS);
353
				}
354
				if ($this->secure === true) {
355
					curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
356
					curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
357
					if ($this->certPath) {
358
						curl_setopt($curl, CURLOPT_CAINFO, $this->certPath);
359
					}
360
				}
361
362
				curl_exec($curl);
363
				$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
@@ 504-510 (lines=7) @@
501
		curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
502
		curl_setopt($curl, CURLOPT_PROTOCOLS,  CURLPROTO_HTTP | CURLPROTO_HTTPS);
503
		curl_setopt($curl, CURLOPT_REDIR_PROTOCOLS,  CURLPROTO_HTTP | CURLPROTO_HTTPS);
504
		if ($this->secure === true) {
505
			curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
506
			curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 2);
507
			if ($this->certPath) {
508
				curl_setopt($curl, CURLOPT_CAINFO, $this->certPath);
509
			}
510
		}
511
		curl_exec($curl);
512
		$statusCode = curl_getinfo($curl, CURLINFO_HTTP_CODE);
513
		if ($statusCode !== 200) {