Code Duplication    Length = 6-12 lines in 2 locations

lib/xmlrpc.inc 2 locations

@@ 2345-2356 (lines=12) @@
2342
							$bd = 0;
2343
						}
2344
					}
2345
					if ($bd)
2346
					{
2347
						// this filters out all http headers from proxy.
2348
						// maybe we could take them into account, too?
2349
						$data = substr($data, $bd);
2350
					}
2351
					else
2352
					{
2353
						error_log('XML-RPC: '.__METHOD__.': HTTPS via proxy error, tunnel connection possibly failed');
2354
						$r=new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['http_error'], $GLOBALS['xmlrpcstr']['http_error']. ' (HTTPS via proxy error, tunnel connection possibly failed)');
2355
						return $r;
2356
					}
2357
				}
2358
2359
				// Strip HTTP 1.1 100 Continue header if present
@@ 2497-2502 (lines=6) @@
2494
					// Decode chunked encoding sent by http 1.1 servers
2495
					if(isset($GLOBALS['_xh']['headers']['transfer-encoding']) && $GLOBALS['_xh']['headers']['transfer-encoding'] == 'chunked')
2496
					{
2497
						if(!$data = decode_chunked($data))
2498
						{
2499
							error_log('XML-RPC: '.__METHOD__.': errors occurred when trying to rebuild the chunked data received from server');
2500
							$r = new xmlrpcresp(0, $GLOBALS['xmlrpcerr']['dechunk_fail'], $GLOBALS['xmlrpcstr']['dechunk_fail']);
2501
							return $r;
2502
						}
2503
					}
2504
2505
					// Decode gzip-compressed stuff