Code Duplication    Length = 5-7 lines in 2 locations

Sources/ShowAttachments.php 1 location

@@ 218-224 (lines=7) @@
215
216
	// Check whether the ETag was sent back, and cache based on that...
217
	$eTag = '"' . substr($_REQUEST['attach'] . $file['filePath'] . filemtime($file['filePath']), 0, 64) . '"';
218
	if (!empty($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'], $eTag) !== false)
219
	{
220
		ob_end_clean();
221
222
		header('HTTP/1.1 304 Not Modified');
223
		exit;
224
	}
225
226
	// If this is a partial download, we need to determine what data range to send
227
	$range = 0;

proxy.php 1 location

@@ 135-139 (lines=5) @@
132
		}
133
134
		$eTag = '"' . substr(sha1($request) . $cached['time'], 0, 64) . '"';
135
		if (!empty($_SERVER['HTTP_IF_NONE_MATCH']) && strpos($_SERVER['HTTP_IF_NONE_MATCH'], $eTag) !== false)
136
		{
137
			header('HTTP/1.1 304 Not Modified');
138
			exit;
139
		}
140
141
		// Make sure we're serving an image
142
		$contentParts = explode('/', !empty($cached['content_type']) ? $cached['content_type'] : '');