Hi Alex,

> I pasted it into "app/role.l", changed 'it' to 'usr', '+It' to '+User'
> and (choIt ..) to (choDlg ..), and it works just fine.

I found it works with the standard deployment with httpGate but does
not work for me when running behind a web server (nginx).  Everything
seems to be working fine except when I press the 'Edit' button and
then +BubbleButton (for example, but it seems it can be other kind of
button too, e.g. [+] button), the client side javascript code should
submit the form first and then carry on with ajax requests for other
button presses (as I understand it).  However, the form does not seem
to be submitted for the first button press in my case even though the
response from the server is:

Response
1
T
0

which I guess means "submit the form"?

The form is not submited when the button is pressed first (or more
time).  If I then press the update link, the buttons start working
fine so I guess the problem is really that the form is not submitted
from the javascript ajax callback when it should be.  Not sure why it
is different when running behind a web server/proxy instead of
httpGate.

The following nginx configuration should be equivalent to httpGate:

   location ~ ^/[0-9]+ {
     if ($request_filename ~* /([0-9]+)/?(.*)) {
       set $gate       http://127.0.0.1:$1/$2$is_args$args;
     }
     proxy_set_header  Host $host;
     proxy_set_header  Gate "$scheme $remote_addr";
     proxy_pass        $gate;
   }

I actualy use a fallback server to internaly redirect the proxy when
the application on the port (which was tried first time) is not
running:

   location ~ ^/[0-9]+ {
     if ($request_filename ~* /([0-9]+)/?(.*)) {
       set $gate       http://127.0.0.1:$1/$2$is_args$args;
     }
     proxy_set_header  Host $host;
     proxy_set_header  Gate "$scheme $remote_addr";
     proxy_pass        $gate;
     error_page        502 = /fallback$uri;
   }
   location ~ ^/fallback/[0-9]+ {
     internal;
     proxy_set_header  Host $host;
     proxy_set_header  Gate "$scheme $remote_addr";
     proxy_pass        http://127.0.0.1:1234;  # fallback server on port 1234
   }

This way the user does not get an error but is redirected to the right
login page of the correct application, if possible.  I put the *Port1
(the application login page port) in the session id so that nothing
else in picolisp had to be changed, the javascript part seems to be
using the right session id anyway so this should not be the problem.

I am wondering what other things could influence submitting the form
from the ajax callback?  (I'll probably have to debug the javascript
code or switch *JS off for now.)

Thank you,

Tomas
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to