Hi

This info if passed to the WOAdaptor, gets passed to the WOApp. You can
find it in the WORequest. ask the request for headerForKey() where the
key name is "x-webobjects-server-name"

NOTE: not all web server interfaces may pass this header. For example
while CGI 1.1 does, NSAPI may not.

Also, I don't know if DirectConnect pulls this information. You might
have to use a real web server to access your WOApp

d

PS: from the WOAdaptor source, the webserver header names are mapped to
WO header names...

static const hdrpair headerTable[] = {
        {"ANNOTATION_SERVER", "x-webobjects-annotation-server"},
        {"AUTH_PASS", "x-webobjects-auth-pass"},
        {"AUTH_TYPE", "x-webobjects-auth-type"},
        {"CONTENT_ENCODING", "content-encoding"},
        {"CONTENT_LENGTH", CONTENT_LENGTH},
        {"CONTENT_TYPE", CONTENT_TYPE},
        {"DOCUMENT_ROOT", "x-webobjects-documentroot"},
        {"GATEWAY_INTERFACE", "x-webobjects-gateway-interface"},
        {"HTTP_ACCEPT", "accept"},
        {"HTTP_ACCEPT_ENCODING", "accept-encoding"},
        {"HTTP_ACCEPT_LANGUAGE", "accept-language"},
        {"HTTP_ALLOW", "allow"},
        {"HTTP_AUTHORIZATION", "authorization"},        
        {"HTTP_COOKIE", "cookie"},
        {"HTTP_DATE", "date"},
        {"HTTP_EXPIRES", "expires"},
        {"HTTP_FROM", "from"},
        {"HTTP_IF_MODIFIED_SINCE", "if-modified-since"},
        {"HTTP_LAST_MODIFIED", "last-modified"},
        {"HTTP_MIME_VERSION", "mime-version"},
        {"HTTP_PRAGMA", "pragma"},
        {"HTTP_REFERER", "referer"},
        {"HTTP_USER_AGENT", "user-agent"},
        {"HTTP_X_WEBOBJECTS_RECORDING", "x-webobjects-recording"},
        {"QUERY_STRING", "x-webobjects-query-string"},
        {"REMOTE_ADDR", "x-webobjects-remote-addr"},
        {"REMOTE_HOST", "x-webobjects-remote-host"},
        {"REMOTE_IDENT", "x-webobjects-remote-ident"},
        {"REMOTE_USER", "x-webobjects-remote-user"},
        {"REQUEST_METHOD", REQUEST_METHOD_HEADER},
        {"SERVER_NAME", "x-webobjects-server-name"},
        {"SERVER_PORT", "x-webobjects-server-port"},
        {"SERVER_SOFTWARE", "x-webobjects-server-software"},
        {NULL,NULL}

Alex Kreindline wrote:
> 
> Hi all,
> 
> >From  wo application i need to find out, how to get the hostname from
> URL.
> 
> For example
> 
> >From     http://hostname/cgi-bin/WebObjects/MyApp
> 
> I expect to get "hostname"
> 
> thanks
> 
> Alex Kreindline

Reply via email to