[REBOL] Re: Amazon S3 Tools linux problem.
From: compkarori:gm:ail at: 21-Sep-2010 21:59
Well, if that is the case, then how about testing if the prot-http.r as
modified by me has a problem on Linux.
So, load the protocol and test to see if you can read any web pages and if
the protocol-http-header works then.
On Tue, Sep 21, 2010 at 9:48 PM, Carl Read <carl-cybercraft.co.nz> wrote:
> Hi again Graham,
> No luck on all fronts, I'm afraid. Chris's protocol works on XP but not on
> Linux, same as your program. And your header capture modification doesn't
> seem to be working, in that protocol-http-header stays at none on Linux. (It
> gets the header object on XP.)
> The error occurs in the Get-s3object function, it not being able to return
> result. (Which you probably know.)
> Also, success in the protocol doesn't seem to be called, suggesting the
> error happens before it gets that far. I added a print comment to success
> before the line with save-header in, and while it prints the comment in XP
> it doesn't in Linux.
> Where to now? :)
> -- Carl Read.
> On Monday, 20-September-2010 at 20:57:24 Graham Chiu wrote,
> >the errors are not very informative, but the headers sent by Amazon do
> >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
> >protocol-http-header: none
> >at the top of the protocol, add this function
> >unless port/locals [port/locals: make object! [list: copy  headers: none
> >querying: no]]
> >generic-proxy?: all [port/proxy/type = 'generic not none? port/proxy/host]
> >>>> add here
> >save-header: func [ obj ][
> >protocol-http-header: obj
> >and change the success function to this:
> >success: [
> >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
> >port/size: 0
> >if port/locals/querying [if headers/Content-Length [port/size: load
> >if error? try [port/date: parse-header-date headers/Last-Modified]
> >[port/date: none]
> >port/status: 'file
> >so, now when it fails, you can inspect the value of the
> >to see what Amazon doesn't like about the authentication.
> >On Mon, Sep 20, 2010 at 8:37 PM, Graham Chiu <compkarori-gmail.com>
> >> 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
> >> well?
> >> http://www.ross-gill.com/r/s3http.r
> >> 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>
> >>> 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
> >>> from Linux yet.)
> >>> Does anyone know what could be causing the difference in behaviour?
> >>> 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.
Synapse - the use from anywhere EMR.