On 25.05.20 01:17, Maksym Zinchenko wrote:
Sorry, actually I don't know about OpenACS, because Im just running NS with custom made app, so I assume it may be an OpenACS question. So I suggest  you to ask on OpenACS forum.
The problem is here a not really OpenACS, but related to typical OpenACS configurations, together with a somewhat unfriendly behavior of NaviServer (same in AOLserver).

Consider the following three register commands:

   ns_register_tcl PUT /REST1/ test.tcl                               ;# 
/usr/local/oacs-5-10/openacs-4/www/test.tcl
   ns_register_tcl PUT /REST2/ /usr/local/oacs-5-10/openacs-4/www/
   ns_register_tcl PUT /REST3/                                        ;# 
/www/REST3/test.tcl

On the right hand side, you see, how the files are actually mapped on my
instance for requests like:

   curl -X PUT -d 'hello world' http://localhost:8100/REST3/test.tcl

When these file exist, everything is fine, also with OpenACS installations.

However, when one points to a non-existing file, and the error
page mapping is configured, then the request leads to

   PageRequest </usr/local/oacs-5-10/openacs-4/www/REST3/test.tcl> FILE NOT 
FOUND
   Interal redirect due to error page mapping to PUT /shared/404

The last request leads to a "method not allowed" result, since a PUT on /shared
is indeed not allowed. This is the "unfriendly" behavior part. Clearly, in
the file-not-found case, the HTTP method should be changed to GET
(not sure, if this the best for all methods).

Not sure, when i can look into this in more details.

Hope this helps

-gn

_______________________________________________
naviserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to