0x10000040
  6   1ˆl–Ðz¾”Jj"T%‚ÆÞS�ÿ�þ]h+6XÈØŸm™$xÏØƒÍ»×Ç¿Ô A    1use IO::Socket::INET;
use Digest::MD5 qw(md5) ;

$NUM = 50;

my @commands;

push @commands, "./uwsgi --http-socket :9191 --disable-logging --static-offload-to-thread 64 --static-map /foobar=./t_foobar.txt --pidfile ./t_foobar.pid &";
push @commands, "./uwsgi --http-socket :9191 --disable-logging -M -p 4 --static-offload-to-thread 64 --static-map /foobar=./t_foobar.txt --pidfile ./t_foobar.pid &";
push @commands, "./uwsgi --http :9191 --disable-logging --static-map /foobar=./t_foobar.txt --static-offload-to-thread 64 --pidfile ./t_foobar.pid &";

print "generating random data for the test...\n";

my $content = generate_random_content(1024*1024);
my $first_digest = md5($content);

open FOOBAR,'>t_foobar.txt';
print FOOBAR $content;
close FOOBAR;

foreach my $cmd(@commands) {

	system $cmd;
	sleep(1);


	my @s;

	print "sending requests to uWSGI...\n";

	for(my $i=0;$i<$NUM;$i++) {
		$s[$i] = IO::Socket::INET->new(PeerAddr => '127.0.0.1', PeerPort => 9191);	
		$s[$i]->send("GET /foobar HTTP/1.0\r\nHost: 127.0.0.1:9191\r\n\r\n");
	}

	my @body;

	print "receiving responses from uWSGI...\n";

	while(1) {
		$end = 0;
		for(my $i=0;$i<$NUM;$i++) {
			$s[$i]->recv(my $buf, 32768);
			$end++ unless $buf;
			$body[$i].=$buf;
		}
		last if $end >= $NUM;
	}

	print "checking uWSGI responses...\n";

	foreach my $data (@body) {
		$data =~ s/^(.|\n|\r)*\r\n\r\n//m;
		if (md5($data) ne $first_digest) {
			end_test("md5 does not match");
		}
	}

	system('kill -INT `cat t_foobar.pid`');

	sleep(3);
}

print "TEST PASSED\n";

sub generate_random_content {
	my $size = shift;
	my @chars=('a'..'z','A'..'Z','0'..'9');
	my $random_string = '';
	foreach (1..$size) {
		$random_string.=$chars[rand @chars];
	}

	return $random_string;
}

sub end_test {
	my $msg = shift;
	print 'TEST FAILED: '.$msg."\n";
	system('kill -INT `cat t_foobar.pid`');
	exit;
}
  !   3ˆÈ�þ^t¤Y²´ôq¸ùHùüÿØ„e§_s×Ç¿Ô ?÷     3package Biber::Entry;
use v5.24;
use strict;
use warnings;

use Biber::Utils;
use Biber::Internals;
use Biber::Constants;
use Data::Dump qw( pp );
use Digest::MD5 qw( md5_hex );
use Encode;
use Log::Log4perl qw( :no_extra_logdie_message );
use List::Util qw( first );

my $logger = Log::Log4perl::get_logger('main');

=encoding utf-8

=head1 NAME

Biber::Entry - Biber::Entry objects

=head2 new

    Initialize a Biber::Entry object

    There are three types of field possible in an entry:

    * data    - These are fields which derive directly from or are themselves fields in the
                data source. Things like YEAR, MONTH, DAY etc. are such fields which are
                derived from, for example, the DATE field. They are part of the original
                data implicitly, derived from a field.
    * derived - These are fields, often meta-information like labelname, labelalpha etc.
                which are more removed from the data fields.

    The reason for this division is largely the entry cloning required for the related entry and
    inheritance features. When we clone an entry or copy some fields from one entry to another
    we generally don't want the "derived" category as such derived meta-fields will often need
    to be re-created or ignored so we need to know which are the actual "data" fields to
    copy/clone.

=cut

sub new {
  my $class = shift;
  my $obj = shift;
  my $self;
  if (defined($obj) and ref($obj) eq 'HASH') {
    $self = bless $obj, $class;
  }
  else {
    $self = bless {}, $class;
  }
  return $self;
}

=head2 relclone

    Recursively create related entry clones starting with an entry

=cut

sub relclone {
  my $self = shift;
  my $citekey = $self->get_field('citekey');
  my $secnum = $Biber::MASTER->get_current_section;
  my $section = $Biber::MASTER->sections->get_section($secnum);
  my $dmh = Biber::Config->get_dm_helpers;
  if (my $relkeys = $self->get_field('related')) {
    if ($logger->is_debug()) {# performance tune
      $logger->debug("Found RELATED field in '$citekey' with contents " . join(',', @$relkeys));
   