Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    cross domain restrictions, différence between port 8080 and port 80

    Hy, i know cross domain restrictions who limits to load from another domain ou port, but i'm using Jboss and her default port 8080.

    But when i bind Jboss on port 80, my application return an alert :

    SmartClient can't directly contact URL 'http://localhost/MyProject/MyServlet' due to browser same-origin policy. Remove the host and port number (even if localhost) to avoid this problem, or use XJSONDataSource for JSONP protocol (which allows cross-site calls), or use the server-side HttpProxy included with SmartClient Server.

    This alert isn't an errror, her is display, but the program and http call work !...
    Where is the check of the using port ?

    #2
    Finally, i have binding my Jboss on port 8080 , 80 and 8081

    Checking my application on port 8080 and 8081 not return me the warning.

    The warning is only show when i go to same URL with port 80

    What it's différent between port 80 and other ports ?...

    Comment


      #3
      Originally posted by immobilia
      What it's différent between port 80 and other ports ?...
      Port 80 is assumed to be the default port for HTTP,so

      http://foo.bar/test

      should be the same as

      http://foo.bar:80/test

      On unixish systems the only user that is allowed to open ServerSockets on ports below 1024 is root.

      Comment


        #4
        Yes, i know http protocol scheme. My serveur run on Windows, i access to free ports : 80, 8080, 8081, but only 80 alert me on cross domain restriction :

        WITH ALERT :
        http://foo.bar/test
        http://foo.bar:80/test

        WITHOUT ALERT :
        http://foo.bar:8080/test
        http://foo.bar:8081/test

        Comment


          #5
          Different browsers consider a cross-port request on the same host as either allowed or not, so we warn regardless, even when it works.

          As far as port 80 being special, it's because it's the default port, so specifying 80 is the same as omitting the port.

          Comment


            #6
            Originally posted by Isomorphic
            Different browsers consider a cross-port request on the same host as either allowed or not, so we warn regardless, even when it works.
            It's possibile to hide this warning ?

            Comment

            Working...
            X