Start a Conversation

This post is more than 5 years old

Solved!

Go to Solution

3987

October 17th, 2009 09:00

Error using "curl" to upload to Atmos Online

Hello Everybody,

I just started using Atmos online and used curl to try to

upload content.

The resulting TCP communication is:

=================================================

POST /rest/objects HTTP/1.1
User-Agent: curl/7.19.6 (x86_64-redhat-linux-gnu) libcurl/7.19.6 NSS/3.12.4.1 Beta zlib/1.2.3 libidn/1.9 libssh2/1.0
Host: accesspoint.emccis.com
Accept: */*
x-emc-date: Sat, 17 Oct 16:02:36 GMT
x-emc-uid: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx/EMCCO9CA0E7C820FF534
x-emc-signature: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=
Content-Length: 26
Content-Type: application/x-www-form-urlencoded

Hello World! This is Heiko


HTTP/1.1 403 Forbidden
Content-Length: 152
Date: Sat, 17 Oct 2009 16:02:36 GMT
Connection: Keep-Alive
Server: Apache
Content-Type: text/xml



.1031
.The request timestamp was outside the valid time window.

=================================================

As one can see the "x-emc-date" and "Date" header lines are equal (fidle around a bit

to get it). Can anyone help what I am doing wrong?

Regards

Heiko

56 Posts

October 20th, 2009 09:00

I don't see a year on your date:

x-emc-date: Sat, 17 Oct 16:02:36 GMT

v.s.

x-emc-date: Sat, 17 Oct 2009 16:02:36 GMT


    

40 Posts

October 18th, 2009 07:00

I can see that both dates are the same but are they correct?  Your clock needs to be within 5 minutes or so of the clock in Atmos.  Your best bet is to set up your computer go set its clock using NIS.

6 Posts

October 19th, 2009 05:00

Thanks for your answer mader,

time clock of my box is update bei NTP.

I.e. both systems - my computer and the atmos online -

have the same time.

First I posted my system time, which is set to CEST (=GMT+2).

But also gut an error. Then I used the "date -u" switch to get utc time

that is equal to GMT resulting in the query I showed.

Regards

Heiko

40 Posts

October 19th, 2009 08:00

I have been using libcurl to access Atmos since early this year.  I am also at version 7.19.6 and don't have this issue.  Early on in my development I did have such problems but they were all related to the clock on my computer being out of sync or using the wrong time zone; both of these you have addressed.  The only other difference that I can see in you request header compared to mine is that I specify the content-type as application/octet-stream.  But I don't have any idea why that would make a difference.

6 Posts

October 20th, 2009 10:00

Thanks Adam,

you are right. I blush for shame.

Regards

Heiko

No Events found!

Top