Are you posting to a different port on the same host? AFAIK, IE allows you to post to the same port, but other browsers consider it a violation of same origin policy.
--Sri On 20 May 2010 20:32, Mike Apolis <[email protected]> wrote: > When sending the code below, everything works great in FF, IE, but the > response that comes back in chrome has a status code of "0", and > contains no data. At a minimum my php script would response back > "FALSE". > > Code: > String requestData = > URL.encode("clientUsername="+authentication.getUsername() > +"&userPassword="+authentication.getPassword()+"&infoNeeded=YES"); > String requestURL = URL.encode("http://www.mydomain.com/testing/ > loginUser.php <http://www.mydomain.com/testing/%0AloginUser.php>"); > RequestBuilder builder = new > RequestBuilder(RequestBuilder.POST, > requestURL); > builder.setTimeoutMillis(5000); > builder.setHeader( "Content-Type", "application/x-www-form- > urlencoded" ); > builder.setRequestData(requestData); > builder.setCallback(new RequestCallback() { > public void onResponseReceived(Request request, > Response response) > { > > if(response.getText().equals("FALSE")){ > callback.onFailure(new > AuthenticationException("Your not a valid > user")); > }else { > if(response.getStatusCode() == 200){ > > setAccount(parseAccount(response.getText())); > callback.onSuccess(account); > } else { > > Window.alert(response.getStatusText() > +"\n"+response.getStatusCode()); > } > } > } > public void onError(Request request, Throwable > exception) { > System.out.println("Error: > "+exception.getMessage()); > Window.alert("Error: > "+exception.getMessage()); > } > }); > try{ > builder.send(); > }catch (RequestException re) { > System.out.println("Error: "+re.getMessage()); > } > > -- > You received this message because you are subscribed to the Google Groups > "Google Web Toolkit" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<google-web-toolkit%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/google-web-toolkit?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
