cURL / Mailing Lists / curl-users / Single Mail


Re: send file to https webserver

From: Ron Eggler <>
Date: Mon, 27 Sep 2010 13:45:21 -0700

Hi There,

Thanks for respoding so promply!
We got it going with -A,-k,-u,-L and -F but the page that's coming
back is a javascript redirect to another page. And it says "JavaScript
needs to be turned on" - unless it redirects... We're executing this
from the shell and thus have no JavaScript going. Any chance that we
can bypass this? And go "ourselves" to the page that would follow in
the same session?
Any clues?


On Mon, Sep 27, 2010 at 1:35 PM, Dan Fandrich <> wrote:
> On Mon, Sep 27, 2010 at 01:00:56PM -0700, Ron Eggler wrote:
>> We would like to send a file to a perl file on an https:// remote
>> webserver. The browser would ask for user credentials username &
>> password. We've tried several things and the closest we've seeminly
>> gotten was with "curl -k  -U admin
>>" - after this it would ask
>> for the password but then it's still barkingn with a 404 about
>> "Authorization Required" - how come? How do we get a file XYZ.bin"
>> sent to
>> Been all over google but didn't find help to get this solved.
>> Thanks for hints and suggestions!
> You're using the -U option which specifies a proxy user/password, not
> a web site user/password. Are you running through a proxy? If not (or even
> if you are), then you need -u to use HTTP authentication (and --anyauth
> to let curl automatically choose the best HTTP authentication method).
> Note also that a 404 error is not an authentication error code.
> curl supports HTTP authentication directly, but many web sites implement
> their own authentication methods which use cookies instead. So, even with
> -u, it still might not work. If that happens, then trace a successful web
> browser upload (using LiveHttpHeaders for Firefox, or similar features on
> other browsers) and compare that to the output you get when you add the
> -v option to curl.
>>>> Dan
> -------------------------------------------------------------------
> List admin:
> FAQ:
> Etiquette:

Ron Eggler
1804 - 1122 Gilford St.
Vancouver, BC
V6G 2P5
(778) 230-9442
List admin:
Received on 2010-09-27