• 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
Re: Get server host from request or url
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Get server host from request or url


  • Subject: Re: Get server host from request or url
  • From: Chuck Hill <email@hidden>
  • Date: Thu, 5 Jul 2007 16:56:19 -0700

Hello Benoit,

How are you handling sessions? When the Flash client requests a web service, what URL does it use?

Chuck


On Jul 5, 2007, at 6:56 AM, Benoit Cantin wrote:

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:
40global-village.net


This email sent to email@hidden


--

Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems.
http://www.global-village.net/products/practical_webobjects






_______________________________________________
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: Benoit Cantin <email@hidden>
References: 
 >Get server host from request or url (From: Benoit Cantin <email@hidden>)

  • Prev by Date: Get server host from request or url
  • Next by Date: Re: WOBuilder Replacement
  • Previous by thread: Get server host from request or url
  • Next by thread: Re: Get server host from request or url
  • Index(es):
    • Date
    • Thread