nginx - Resource responding well on browser, but empty with curl -


i'm making request http://mydomain.com/api/company?keyword=demo, , on browser, works , return array of objects. here's info shown on network tab of chrome dev tools:

remote address:10.10.0.245:80 request url:http://mydomain.com/api/company?keyword=demo request method:get status code:200 ok  request headers     /api/company?keyword=demo http/1.1     host: mydomain.com     connection: keep-alive     cache-control: max-age=0     accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8     user-agent: mozilla/5.0 (macintosh; intel mac os x 10_9_3) applewebkit/537.36 (khtml, gecko) chrome/35.0.1916.114 safari/537.36     accept-encoding: gzip,deflate,sdch     accept-language: en-us,en;q=0.8,es;q=0.6     cookie: optimizelyenduserid=oeu1399053750186r0.30155641376040876; km_ai=xmfdodcdx6yxgralt3hwvxiotng%3d; km_lv=x; __gads=id=69f17ebdd35fb788:t=1399063348:s=alni_mzoemxyluzvqfunqnga_hnab9phbq; aic_s3=5366b00d4170e2b1358b457b; km_uq=; optimizelysegments=%7b%22536810235%22%3a%22false%22%2c%22538650221%22%3a%22direct%22%2c%22548110140%22%3a%22gc%22%7d; optimizelybuckets=%7b%7d; phpsessid=mq3vnkdqt69iki8vq1vb7aiah6; __atuvc=2%7c21%2c7%7c22; aic_s3=5366b00d4170e2b1358b457b     query string parametersview parsed     keyword=demo response headers     http/1.1 200 ok     server: nginx/1.2.1     date: thu, 29 may 2014 17:41:35 gmt     content-type: text/html     transfer-encoding: chunked     connection: close     x-powered-by: php/5.4.4-14+deb7u7     access-control-allow-origin: *     expires: thu, 19 nov 1981 08:52:00 gmt     cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0     pragma: no-cache     content-encoding: gzip 

however, when make request using curl -v http://mydomain.com/api/company?keyword=demo, empty response:

* adding handle: conn: 0x7fa30c008c00 * adding handle: send: 0 * adding handle: recv: 0 * curl_addhandletopipeline: length: 1 * - conn 0 (0x7fa30c008c00) send_pipe: 1, recv_pipe: 0 * connect() mydomain.com port 80 (#0) *   trying 10.10.0.245... * connected mydomain.com (10.10.0.245) port 80 (#0) > /api/company?keywordrd=demo http/1.1 > user-agent: curl/7.30.0 > host: mydomain.com > accept: */* >  < http/1.1 200 ok * server nginx/1.2.1 not blacklisted < server: nginx/1.2.1 < date: thu, 29 may 2014 17:44:22 gmt < content-type: application/json; charset=utf-8 < transfer-encoding: chunked < connection: close < x-powered-by: php/5.4.4-14+deb7u7 < access-control-allow-origin: * < set-cookie: phpsessid=k98a20a34eosum2vjojicudgo3; path=/ < expires: thu, 19 nov 1981 08:52:00 gmt < cache-control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0 < pragma: no-cache < set-cookie: aic_s3=538771f6f8c312fe0c8b45af; expires=wed, 23-apr-2059 11:28:44 gmt; path=/; domain=.mydomain.com <  * closing connection 0 

what cause of this?


Comments

Popular posts from this blog

php - render data via PDO::FETCH_FUNC vs loop -

c++ - OpenCV Error: Assertion failed <scn == 3 ::scn == 4> in unknown function, -

The canvas has been tainted by cross-origin data in chrome only -