[REBOL] Re: Amazon S3 Tools linux problem.
From: compkarori:gma:il at: 20-Sep-2010 20:57
the errors are not very informative, but the headers sent by Amazon do hold
the error information you need.
So, we need to modify the http protocol to give this to us .. eg.
create a global to capture the headers
at the top of the protocol, add this function
unless port/locals [port/locals: make object! [list: copy  headers: none
generic-proxy?: all [port/proxy/type = 'generic not none? port/proxy/host]
>>> add here
save-header: func [ obj ][
and change the success function to this:
headers: make string! 500
while [ ( line: pick port/sub-port 1 ) <> "" ] [append headers join line
] ; remove the headers
port/locals/headers: headers: save-header Parse-Header HTTP-Header headers
if port/locals/querying [if headers/Content-Length [port/size: load
if error? try [port/date: parse-header-date headers/Last-Modified]
so, now when it fails, you can inspect the value of the protocol-http-header
to see what Amazon doesn't like about the authentication.
On Mon, Sep 20, 2010 at 8:37 PM, Graham Chiu <compkarori-gmail.com> wrote:
> Hi Carl
> I never tested on Linux ... but the forbidden error suggests that the
> authentication is not working.
> As an alternative Chris rewrote this as a protocol. Perhaps try that as
> If you find the problem, let me know so I can fix it :)
> On Mon, Sep 20, 2010 at 8:22 PM, Carl Read <carl-cybercraft.co.nz> wrote:
>> Hi all,
>> I've got the Amazon S3 tools (see: http://rebol.wik.is/S3 ) to work on
>> Windows XP, but I get a 403 Forbidden error on Linux when using the
>> Get-s3object function to try and download a file. (I've not tried uploading
>> from Linux yet.)
>> Does anyone know what could be causing the difference in behaviour? (Note
>> I'm no Linux expert.)
>> -- Carl Read.
>> To unsubscribe from the list, just send an email to
>> lists at rebol.com with unsubscribe as the subject.
> Graham Chiu
> Synapse - the use from anywhere EMR.
Synapse - the use from anywhere EMR.