Hi,

I'm using qx.io.remote.Request for logging into my rails backend and
logging in works fine when username/pass is right. When I mistype or
deliberately return error code like "403" with some reason like
"password wrong" from the server, I don't get the reason in the content,
but only the 403 code from the "e" object sent to the "failed" event
handler. Code looks like:

> req.addListener("completed", function(res){
>           alert("Login completed:" + res.getContent() + " and status
> code is:" + res.getStatusCode());
>           R     =   res;
>         });
>         
>         req.addListener("timeout", function(fail){
>           alert("Login timed out:" + fail.getContent() + " and status
> code is:" + fail.getStatusCode());
>           R     =   fail;
>         });
>         
>         req.addListener("failed", function(t){
>           alert("Login failed:" + t.getContent() + " and status code
> is:" + t.getStatusCode());
>           R     =   t;
>         });
>         
The sequence is as follows:

1) Wrong username and pass
    Status is 403 but content is null, instead of "wrong pass"
2) Right username and pass
    Status is 200 and content is "Login success"
3) Logout, works fine and I'm using a HTML page for logout.
4) Wrong user/pass again
     Status is 403 but content is "Login success" instead of "wrong
pass". Seems like the previous login request's data is being shown in
the alert box. All this while, firebug's console shows the right
result+status code being sent from rails. And rails' dev log also
confirms the same. So this seems like a bug in qooxdoo 0.8.2 which is
what I'm using.

Hope someone can chip in and bail me out of this trouble.

cheers,
skar.

-- 
--
The life so short, the craft so long to learn.


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

Reply via email to