Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

cURL always return "401 Unauthorized"

Posted on 2008-06-24
2
Medium Priority
?
1,554 Views
Last Modified: 2010-04-21
Hi,

I'm trying to automatically download log files from our video conference servers. When I try this with a browser is works (authentication -> save file as).

Now I want to use the cURL command in a script to get the files but it wont work. Here the command I use:

curl --anyauth --insecure --proxy-user 'xxx:yyy' --proxy-ntlm --proxy 'http://x.x.x.x:8080/' --connect-timeout '10' --user 'authname:authpw' --output 'output.txt' https://x.x.x.x/localcdr.csv

The result in the output.txt file = 401 Unauthorized - User authentication is required.

Now the tricky part: 1 of the 7 servers is returning the file with the above command, the other 6 wont :(
With a browser => they work.

Who can help me or has some tips?

Thanks in advance
Filips
0
Comment
Question by:Filips
2 Comments
 
LVL 4

Accepted Solution

by:
snrudda earned 1000 total points
ID: 21854998
May find a way out of this fuzz by using sniffer like Wireshark (http://www.wireshark.org/) to see what's the difference between 1 and 6 servers.

I'd rather said servers check some secondary attributes like User-agent or Cookies, you may never guess that without sniffer :)
0
 
LVL 6

Author Closing Comment

by:Filips
ID: 31470103
This was a good hint. I didn't do a sniff but checked the headers with another tool. Result: our network guys made an error in the authentication module.

Thanks snrudda
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
This article discusses how to create an extensible mechanism for linked drop downs.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question