Jump to content


Photo

Nginx return empty data, while header is 200 OK

nginx

  • Please log in to reply
No replies to this topic

#1 khoanhd

khoanhd

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 15 May 2014 - 01:09 AM

I have a problem with my rest service as below:
 
 1. a server with NGinx, PHP-FPM, provide rest service: example: http://example.com/rest.php, this link only show content: 1001:Successfully
 2. another server using curl call this rest service to get content. With happy case, it must get content from rest service is 1001:Successfully. But problem happen -
In most case it get content ok, but sometimes I get empty content while http_status is 200 ok. I don't know what is happening. Could anyone help me?
 
Empty content and CURL debug information as below:
 
    '* About to connect() to example.com port 80 (#0)
    *   Trying xxx.xxx.xxx.xxx...
    * connected
    * Connected to example.com (xxx.xxx.xxx.xxx) port 80 (#0)
    > GET /rest.php HTTP/1.1
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20041001 Firefox/0.10.1
    Host: example.com
    Accept: */*
    Accept-Encoding: deflate, gzip
    
    < HTTP/1.1 200 OK
    < Server: XXX
    < Date: Mon, 12 May 2014 12:58:17 GMT
    < Content-Type: text/html
    < Transfer-Encoding: chunked
    < Connection: keep-alive
    < 
    * Connection #0 to host channel.ssgroup.vn left intact
    * Closing connection #0
    ',
    )





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com