World: r3wp
[!Cheyenne] Discussions about the Cheyenne Web Server
older newer | first last |
Graham 17-Oct-2008 [3197] | I'll try the -www |
Dockimbel 17-Oct-2008 [3198] | The last one in the list will be the last loaded, so will be able to take the FIRST or LAST place even if other previously loaded mods did the same. |
Graham 17-Oct-2008 [3199] | so, it has to be last then? |
Dockimbel 17-Oct-2008 [3200] | Your mod should be *after* mod-static. |
Graham 17-Oct-2008 [3201x3] | ok. |
18/10-08:16:29.195-[HTTPd] Trying phase url-translate ( mod-rest ) 18/10-08:16:29.201-[HTTPd] Trying phase url-translate ( mod-static ) 18/10-08:16:29.210-[uniserve] Calling >on-received< with {^M | |
url-translate is returning 'true in mod-rest, but mod-static is still being called | |
Dockimbel 17-Oct-2008 [3204] | That's odd. |
Graham 17-Oct-2008 [3205] | True Request processed. Prevent other modules from processing this request (for the current phases). |
Dockimbel 17-Oct-2008 [3206] | That how it's supposed to work. |
Graham 17-Oct-2008 [3207x2] | ahh.... |
what's this line do? if not find/part req/in/url "/@" 2 [return none] | |
Dockimbel 17-Oct-2008 [3209x2] | It give up on processing the request and pass it to other mods. |
gives | |
Graham 17-Oct-2008 [3211] | so that's happening |
Dockimbel 17-Oct-2008 [3212] | Only URLs starting with /@ pattern will be processed by this mod's callback. |
Graham 17-Oct-2008 [3213] | is that because the examples I gave you had /@ in them? :) |
Dockimbel 17-Oct-2008 [3214] | Yes :) |
Graham 17-Oct-2008 [3215x7] | ok ;) |
Things are a lot clearer now :) | |
It's probably a good idea though ... makes it easy to process the rest requests from others | |
If you use a url like http://user:[password-:-localhost]/ where is the user and password captured? I see the browsers FF and Chrome immediately remove the userid/password from the address bar. IE complains that it's not a valid site | |
It's not in req/auth which is empty | |
and it's been removed already from req/in/url | |
before the url-translate phase | |
Dockimbel 18-Oct-2008 [3222] | It's passed though WWW-Authenticate header. See http://en.wikipedia.org/wiki/Basic_access_authentication |
Graham 18-Oct-2008 [3223x4] | doh ... I think I knew that! |
I've done enough masquerading with Rebol as a http client! | |
Amazing how much stuff one forgets :( | |
And I see my problem ... I was looking for header information in url-translate prior to the headers being parsed which is why I couldn't see that information. | |
Dockimbel 18-Oct-2008 [3227] | Graham, as you have a fresh eye on mods building, if you notice things that might be improved, I'll be glad to hear your comments. |
Graham 18-Oct-2008 [3228] | as far as I can tell ...just need more docs :) |
Kaj 18-Oct-2008 [3229] | As in, more Dockimbels to develop on it? ;-) |
Graham 18-Oct-2008 [3230x5] | Well, I made only a few changes and got this far http://rebol.wik.is/Cheyenne/Mod-rest |
I'm creating an API, and each api word maps to a single rsp page inside a %rest directory. It is up to the rsp page to decide which actual function is being called, and to deal with all the parameters. | |
And also to deal with authentication. Basic authentication will be used for each api call .. and the whole site will be behind https. | |
so, DELETE /@api/fax/jobno and GET /@api/fax/jobno both map to the same rsp page. | |
This scheme sound okay? | |
Dockimbel 18-Oct-2008 [3235x2] | I'm not a REST expert, but your code looks ok to me so far. |
Tunneling Basic authentication through SSL is a wise decision. | |
Graham 19-Oct-2008 [3237x2] | What's the purpose of the .cache.efs file that gets written . I think this was the file I saw before that I didn't have writes to write to the local filing system |
rights to to write | |
Dockimbel 19-Oct-2008 [3239] | It's the cache generated for encapping Cheyenne by my encap-fs library. It's needed only for encapping. |
Graham 19-Oct-2008 [3240x5] | Is the captcha library still working for other people on v 19 ? |
Not working so far for me. | |
fordidden: charset "iIl1LoO0*ΰηθικω" allowed: exclude charset [ #"0" - #"9" #"A" - #"Z" #"a" - #"z" "@ΰηθικω*" ] fordidden I think you meant 'forbidden | |
set-fonts-path: func [value [file!]][fonts-path: dirize value] but set-fonts-path is not called inside 'captcha.r | |
I've got this in app-init.r on-application-start: does [ ;--- add here your library / modules loading do %private/captcha.r captcha/set-fonts-path %private/fonts/ ] but for some reason the do %private/captcha.r is not firing. | |
Graham 20-Oct-2008 [3245x2] | More testing. If I remove this code form app-init.r it does not work. If I don't have do %private/captcha.r captcha/set-fonts-path %private/fonts/ also in my login.rsp, it doesn't work. |
So, in summary I need this code both in app-init.r and in my login.rsp | |
older newer | first last |