Will try that too Graham, hopefully tomorrow night, and will let you know the 
results.

-- Carl Read.


On Monday, 20-September-2010 at 20:57:24 Graham Chiu wrote,

>Carl
>
>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
>
>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
>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
>headers/Content-Length]]
>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 protocol-http-header
>to see what Amazon doesn't like about the authentication.
>
>HTH

-- 
To unsubscribe from the list, just send an email to 
lists at rebol.com with unsubscribe as the subject.

Reply via email to