-
Notifications
You must be signed in to change notification settings - Fork 390
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
52 changed files
with
29 additions
and
5,127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
* * | ||
* hprose for php 5.3+ * | ||
* * | ||
* LastModified: Apr 1, 2015 * | ||
* LastModified: Apr 2, 2015 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
@@ -54,19 +54,19 @@ function hprose_unserialize($data, $simple = false) { | |
} | ||
} | ||
|
||
require('Hprose/HttpClient.php'); | ||
require('Hprose/HttpService.php'); | ||
require('Hprose/Swoole/HttpService.php'); | ||
require('Hprose/Http/Client.php'); | ||
require('Hprose/Http/Service.php'); | ||
require('Hprose/Swoole/Http/Service.php'); | ||
require('Hprose/Filter/JSONRPC/ClientFilter.php'); | ||
require('Hprose/Filter/JSONRPC/ServiceFilter.php'); | ||
require('Hprose/Filter/XMLRPC/ClientFilter.php'); | ||
require('Hprose/Filter/XMLRPC/ServiceFilter.php'); | ||
|
||
class_alias('Hprose\\HttpClient', 'HproseHttpClient'); | ||
class_alias('Hprose\\HttpService', 'HproseHttpService'); | ||
class_alias('Hprose\\HttpServer', 'HproseHttpServer'); | ||
class_alias('Hprose\\Swoole\\HttpService', 'HproseSwooleHttpService'); | ||
class_alias('Hprose\\Swoole\\HttpServer', 'HproseSwooleHttpServer'); | ||
class_alias('Hprose\\Http\\Client', 'HproseHttpClient'); | ||
class_alias('Hprose\\Http\\Service', 'HproseHttpService'); | ||
class_alias('Hprose\\Http\\Server', 'HproseHttpServer'); | ||
class_alias('Hprose\\Swoole\\Http\\Service', 'HproseSwooleHttpService'); | ||
class_alias('Hprose\\Swoole\\Http\\Server', 'HproseSwooleHttpServer'); | ||
class_alias('Hprose\\Filter\\JSONRPC\\ClientFilter', 'HproseJSONRPCClientFilter'); | ||
class_alias('Hprose\\Filter\\JSONRPC\\ServiceFilter', 'HproseJSONRPCServiceFilter'); | ||
class_alias('Hprose\\Filter\\XMLRPC\\ClientFilter', 'HproseXMLRPCClientFilter'); | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,17 @@ | |
|
||
/**********************************************************\ | ||
* * | ||
* Hprose/HttpClient.php * | ||
* Hprose/Http/Client.php * | ||
* * | ||
* hprose http client class for php 5.3+ * | ||
* * | ||
* LastModified: Mar 26, 2015 * | ||
* LastModified: Apr 2, 2015 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
||
namespace Hprose { | ||
class HttpClient extends Client { | ||
namespace Hprose\Http { | ||
class Client extends \Hprose\Client { | ||
private static $cookieManager = array(); | ||
private $host = ''; | ||
private $path = ''; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,17 +10,17 @@ | |
|
||
/**********************************************************\ | ||
* * | ||
* Hprose/HttpServer.php * | ||
* Hprose/Http/Server.php * | ||
* * | ||
* hprose http server class for php 5.3+ * | ||
* * | ||
* LastModified: Mar 29, 2015 * | ||
* LastModified: Apr 2, 2015 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
||
namespace Hprose { | ||
class HttpService extends Service { | ||
namespace Hprose\Http { | ||
class Service extends \Hprose\Service { | ||
private $crossDomain = false; | ||
private $P3P = false; | ||
private $get = true; | ||
|
@@ -87,8 +87,12 @@ public function removeAccessControlAllowOrigin($origin) { | |
unset($this->origins[strtolower($origin)]); | ||
} | ||
public function handle() { | ||
$request = file_get_contents("php://input"); | ||
|
||
if (isset($HTTP_RAW_POST_DATA)) { | ||
$request = $HTTP_RAW_POST_DATA; | ||
} | ||
else { | ||
$request = file_get_contents("php://input"); | ||
} | ||
$context = new \stdClass(); | ||
$context->server = $this; | ||
$context->userdata = new \stdClass(); | ||
|
@@ -136,7 +140,7 @@ public function handle() { | |
} | ||
} | ||
|
||
class HttpServer extends HttpService { | ||
class Server extends Service { | ||
public function start() { | ||
$this->handle(); | ||
} | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,13 +14,13 @@ | |
* * | ||
* hprose swoole http service library for php 5.3+ * | ||
* * | ||
* LastModified: Apr 1, 2015 * | ||
* LastModified: Apr 2, 2015 * | ||
* Author: Ma Bingyao <[email protected]> * | ||
* * | ||
\**********************************************************/ | ||
|
||
namespace Hprose\Swoole { | ||
class HttpService extends \Hprose\Service { | ||
namespace Hprose\Swoole\Http { | ||
class Service extends \Hprose\Service { | ||
private $crossDomain = false; | ||
private $P3P = false; | ||
private $get = true; | ||
|
@@ -138,7 +138,7 @@ public function handle($request, $response) { | |
} | ||
} | ||
|
||
class HttpServer extends HttpService { | ||
class Server extends Service { | ||
private $http; | ||
public function __construct($host, $port) { | ||
$this->http = new \swoole_http_server($host, $port); | ||
|
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,7 +18,7 @@ | |
}, | ||
"autoload": { | ||
"classmap": [ | ||
"./php5/" | ||
"./" | ||
] | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.