cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Uploading file to auth http server, when login url is different to upload url??

From: Theodore H. Smith <delete_at_elfdata.com>
Date: Wed, 1 Nov 2006 20:02:05 +0000

On 1 Nov 2006, at 19:31, Dan Fandrich wrote:

> On Wed, Nov 01, 2006 at 06:44:50PM +0000, Theodore H. Smith wrote:
>> Yes I tried. I got a 404 error. I can't actually tell if it's simply
>> ignoring me (as it should), or the file to upload really doesn't
>> exist.
>
> That's fishy. A 404 code is not the correct code to return in this
> case.

You are right. Apologies people I've been chasing a red herring. The
URL was wrong after all. It's not workign correctly, but this time I
get a proper error message when accessing the correct URL, at least
with one approach. This time I'm getting:

aspSmartUpload error '800a0009'

Subscript out of range

C:\LEARNWISE\WEB\COURSEBUILDER\IMPORTCOURSE\..\..\mod_admin_sql
\imp_exp\generic\import.asp, line 126

Which looks much more likely.

>> I tried -c "cookiesTest.txt"
>>
>> I got a "login accepted" page returned. Only thing... no
>> cookiesText.txt was created. I assume that means the server is
>> returning no cookies? I wonder how it knows if we are logged in or
>> not then?
>
> Correct. There might be some Javascript involved here.
>
>> OK good to hear. Will curl as a shell tool be enough or must I use
>> the library? If possible, I'd rather use it in shell form, simply
>> because my code is already set up this way and it's easier to
>> experiment with in the OSX terminal.
>
> It depends on how this login issue goes. Unless you need a JavaScript
> parser in the loop, the shell tool is probably good enough.
>
> A this point, I think the best way for you to proceed is to use
> LiveHttpHeaders or some other HTTP request tracing tool to find out
> what a browser does in order to do a proper upload. Once you figure
> out what you're missing, you can get curl to replicate that.

Sounds like a good idea. Thanks!
Received on 2006-11-01