LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-12-2017, 09:17 AM   #1
pradeepspa
Member
 
Registered: Oct 2015
Posts: 79

Rep: Reputation: Disabled
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
 
Old 09-13-2017, 09:48 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,475

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
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.
 
1 members found this post helpful.
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Command returns null or empty in shell script within su - madhav.kulkarni1986 Programming 10 02-26-2016 05:13 AM
curl returns 404 error while web browser working fine mitter1989 Linux - Server 1 09-11-2014 08:13 AM
[SOLVED] curl returns error 401 bash amboxer21 Programming 1 10-04-2012 10:00 PM
Curl returns 18 in Apache and 23 in Nginx for Range Request. vijaya_svk Programming 0 12-18-2011 09:30 PM
[SOLVED] cURL POST data command from shell returns HTTP Error Code 408 fyndr Linux - Software 3 03-04-2011 09:17 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration