Bogous HTTP headers from adaptor
Bogous HTTP headers from adaptor
- Subject: Bogous HTTP headers from adaptor
- From: <email@hidden>
- Date: Tue, 24 Feb 2004 18:01:39 +0100
- Thread-topic: Bogous HTTP headers from adaptor
Hi!
I am seeing a problem on a deployed application. Methods generating complete URLs fail to properly do so: the generated URL omits the non standard port number. My belief is that this stems from the "x-webobjects-server-port" key missing from the header passed onto the application by the adaptor.
In an attempt to fix the promblem I wrote code to infers this header key should it be missing. Now I have two header keys to start from "server_port" and "host". Trouble is that "server_port" is just plain wrong. The port the Apache server is running on is 7070. Yet "server_port" a truncated value of 707. The "host" key comes in as savior. It includes both server name and port number.
Unfortunately the above is only true for the first request to my application. Subsequent requests (triggered from a JavaClient Webstart launch) do not include the "host" key. The value for "server_port" gets funnier too. It now is an array made of both the correct and the truncated value.
I see the same truncated port number on the WOAdaptorInfoPage. Yet the test-cgi script included with Apache has the correct value. This leads me to believe that the WebObjects adaptor - besides skipping "x-webobjects-server-port" - does something bad that truncates the value of the Apache generated "server_port" header value.
Yet I find it hard to believe that no one has had trouble running WebObjects application with a web server having a port number greater than 999. Well, the problem shows up only when generating comptlete URLs. Most dynamic elements rely on relative URLs only.
Sample header dictionaries as in Session.awake():
awake - headers: {remote_host = ("10.1.4.120"); user-agent = ("Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5
.0)"); x-webobjects-adaptor-version = ("Apache"); document_root = ("/usr/local/apache/htdocsTest"); server_nam
e = ("uhura.bcl.lu"); accept = ("*/*"); unique_id = ("QDtnOwoBAVYAABrmI4k"); remote_addr = ("10.1.4.120"); ref
erer = ("http://uhura.bcl.lu:1076/cgi-bin/WebObjects/JavaMonitor.woa/wo/LbBGRubNrGMFqR97dB4mKg/122.0.1.0"); re
mote_port = ("4020"); x-webobjects-request-id = ("4038172e0000056c000000d1"); server_admin = ("[no address giv
en]"); server_software = ("Apache/1.3.9"); script_filename = ("/mbstest/WebObjects/MBSTableBuilder.woa/1"); x-
webobjects-request-method = ("GET"); accept-encoding = ("gzip, deflate"); server_port = ("707"); host = ("uhur
a:7070"); accept-language = ("fr-lu,fr;q=0.5"); connection = ("keep-alive"); }
awake - headers: {remote_host = ("10.1.4.120"); server_software = ("Apache/1.3.9"); cookie = ("wosid=null;");
document_root = ("/usr/local/apache/htdocsTest"); server_name = ("uhura.bcl.lu", "uhura.bcl.lu"); unique_id =
("QDtnPwoBAVYAAGWJEtc"); remote_addr = ("10.1.4.120"); x-webobjects-request-id = ("4038172e0000056c0000011b");
server_admin = ("[no address given]"); x-webobjects-request-method = ("GET"); x-webobjects-adaptor-version =
("Apache"); remote_port = ("4028"); script_filename = ("/mbstest/WebObjects/MBSTableBuilder.woa/wa/com.webobje
cts.eodistribution._EOHTTPInitialAction/componentURL"); server_port = ("7070", "707"); connection = ("keep-ali
ve"); }
Pierre
**********************************************************************
This email and any files transmitted with it are intended solely for
the use of the individual or entity to whom they are addressed.
If you have received this email in error please notify the sender
of this message. (email@hidden)
This email message has been checked for the presence of computer
viruses; however this protection does not ensure this message is
virus free.
Banque centrale du Luxembourg; Tel ++352-4774-1; http://www.bcl.lu
**********************************************************************
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.