cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Authentication via proxy on a cloud

From: Dan Fandrich <dan_at_coneharvesters.com>
Date: Fri, 27 Jul 2012 23:52:55 +0200

On Fri, Jul 27, 2012 at 04:00:59PM -0400, Rohit Kanchan wrote:
> I use zscaler cloud proxy which does the authentication via SAML - single sign
> on. I want to monitor the proxy servers using command line curl
> This is what I am trying... but can't get the authentication right. Can someone
> help?
>
> C:\curl>curl -v -A "MSIE 9.0" -x 10.70.0.10:80 -L
> http://www.addictinggames.com
> / -b 'Cookie: _sm_au_c=iVVTqsqrJN4FSk5P0c' -k --insecure
[...]
> * Connection #1 to host 10.70.0.10 left intact
> * Re-using existing connection! (#0) with host 10.70.0.10
> * Connected to 10.70.0.10 (10.70.0.10) port 80 (#0)
> > GET http://_sm_au_c=iVVTqsqrJN4FSk5P0c' HTTP/1.1
> > User-Agent: MSIE 9.0
> > Host: _sm_au_c=iVVTqsqrJN4FSk5P0c'
> > Accept: */*
> > Proxy-Connection: Keep-Alive
> >
> * HTTP 1.0, assume close after body
> < HTTP/1.0 400 Bad request
> < Server: Zscaler/3.6
> < Content-Type: text/html
> < Connection: close

This bogus request is due to a bad command-line parameter; curl is
treating the _sm_au_c=iVVTqsqrJN4FSk5P0c as a URL and trying to connect
to it. It looks like your shell doesn't allow single quotes to surround
options. Try replacing them with double quotes and see if you get any
further.

>>> Dan
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-07-27