Comment 3 for bug 1152707

Revision history for this message
Máximo Cuadros (maximo-i) wrote :

Its a bit weird i compiled the trunk version too, and i get the same result:
$ telnet localhost 1111
Trying ::1...
Connected to localhost.
Escape character is '^]'.
POST /reverse HTTP/1.1
Content-Length: 12

Hello world!
HTTP/1.0 200 OK
X-Gearman-Job-Handle: H:mc-air:21
X-Gearman-Command: GEARMAN_COMMAND_WORK_COMPLETE
Content-Length: 0
Server: Gearman/1.1.6

!dlrow olleH

This is with the code from: "bzr branch lp:gearmand" compiled with:
./configure --disable-libdrizzle --disable-hiredis --disable-libmemcached --disable-libmysql --disable-libpq --disable-libsqlite3 --disable-option-checking --with-sqlite3=no --with-mysql=no

And the worker code is:
<?php

$gmworker= new GearmanWorker();
$gmworker->addServer('localhost', 4730);
$gmworker->addFunction('reverse', function($job) {
    return strrev($job->workload());
});

print "Waiting for job...\n";
while( $gmworker->work() ) {
    if ($gmworker->returnCode() != GEARMAN_SUCCESS) {
        echo "return_code: " . $gmworker->returnCode() . "\n";
        break;
    }
}