I'm not explicitly asking it to post to any specific port to my knowledge. My url is http://www.mydomain.com/testing/login.php. The site.html file and accompanying folder are in the same directory "testing" as the php file.
I've seen alot of things about SOP, but I thought if they were on the same domain I should be fine. Would each folder be a different port? Also, I noticed its not a problem unless I navigate to the page with a history token. i.e. (mydomain.com/testing.html#initialLogin) fails, but mydomain.com/testing.html works. Thanks for all your help. On May 20, 4:02 pm, Sripathi Krishnan <[email protected]> wrote: > 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 > athttp://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.
