• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Get server host from request or url
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Get server host from request or url


  • Subject: Get server host from request or url
  • From: Benoit Cantin <email@hidden>
  • Date: Thu, 05 Jul 2007 15:56:14 +0200

Dear list,

I would like to establish a connexion between a webobjects server and a flash client.

To do so, I have to transfer the server's FQDN, or the server's IP adress to the flash client as a flash variable passed to the swf.

The flash client, then, communicate through web services using this variable.

The problem is that it seems that when the server return its FQDN and if a try to contact the server through it's IP adress without specifying the port on which my application instance run, then, I just can't get my web services.

If I force the server to return it's IP, it just work. But if I try to contact the server through it FQDN, it fails.

Here is the method involved on the server in returning the host name.

public String serverNameFromRequest(WORequest request) {
		String s = request.headerForKey("x-webobjects-server-name");
		if (s == null) {
			s = request.headerForKey("server_name");
		}
		if (s == null) {
			s = request.headerForKey("host");
		}
		if (s == null) {
			s = request._originatingAddress().getHostAddress();
		}
		if (s == null) {
			s = WOApplication.application().host();
		}
		return s;

Does anybody ever have this problem ? Any help is appreciated.
Thank you.

--
Benoit Cantin

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Get server host from request or url
      • From: Chuck Hill <email@hidden>
  • Prev by Date: Re: HTTP/1.1 and Chunked transfers
  • Next by Date: Re: Get server host from request or url
  • Previous by thread: Re: HTTP/1.1 and Chunked transfers
  • Next by thread: Re: Get server host from request or url
  • Index(es):
    • Date
    • Thread