LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Curl Command returns empty reponse (https://www.linuxquestions.org/questions/linux-newbie-8/curl-command-returns-empty-reponse-4175613667/)

pradeepspa 09-12-2017 09:17 AM

Curl Command returns empty reponse
 
Hello Folks,

I am trying a curl command which return empty response. When I try from the browser, it gives a file to download having necessary stats.

Here is the command I am trying

Quote:

> curl -v -u xxxx:xxxx http://10.20.3.140/stats

About to connect() to 10.20.3.140 port 80 (#0)

Trying 10.20.3.140...

Connected to 10.20.3.140 (10.20.3.140) port 80 (#0)

Server auth using Basic with user 'xxxx'

> GET /stats HTTP/1.1

> Authorization: Basic dWJudDpYcGwwcm4zKw==

> User-Agent: curl/7.29.0

> Host: 10.20.3.140

> Accept: */*

>
< HTTP/1.1 302 Found

< Set-Cookie: AIROS_DC9FDB29C2C5=be469d3187821145ce61ad08396bdb92; Path=/; Version=1

< Location: /cookiechecker?uri=/stats

< Content-Length: 0

< Date: Sun, 14 May 2017 12:51:52 GMT

< Server: lighttpd/1.4.39

<

* Connection #0 to host 10.20.3.140 left intact

TenTenths 09-13-2017 09:48 AM

So what did you try to solve this issue?

From what you've told curl to do then the "empty" response is correct in this case.

hints: Go read up on HTTP response codes and go read the curl man page.


All times are GMT -5. The time now is 03:44 PM.