shpub json

raw

phork0.diff

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
diff --git src/shpub/Command/Targets.php src/shpub/Command/Targets.php
index eb66692..ad8bd05 100644
--- src/shpub/Command/Targets.php
+++ src/shpub/Command/Targets.php
@@ -29,7 +29,8 @@ public function run(\Console_CommandLine_Result $cmdRes)
         $req->req->getUrl()->setQueryVariable('q', 'syndicate-to');
         $res = $req->send();
 
-        if ($res->getHeader('content-type') != 'application/json') {
+        list($type, ) = explode(';', $res->getHeader('content-type'));
+        if ($type != 'application/json') {
             Log::err('response data are not of type application/json');
             exit(2);
         }
 
Anonymous Anonymous
owner

History