Hi Skar,
I'm not a not a expert for qx.io.remote.Request as far as I know is it
not possible to reuse one request instance. You have to use one request
instance for each request.
I have looked to the current implementation, the code does explicit set
the content only if the request was successful. I don't why it is
implemented this way, but I would say this is a bug. Could you please
open a bug report for that? Thanks!
Cheers,
Chris
skar schrieb:
> 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.
>
>
--
Christian Schmidt
Software Entwickler
1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]
Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel