More troubleshooting ... on 7.3 the code

  CMD.STATUS = setRequestHeader(RHANDLE,"Host",HOST.AND.PORT)


adds a second entry to the host header instead of replacing it, such as:


Host: www.myplace.com, www.myplace.com


So I am putting in a conditional to only add the Host header for UniData 7.2, 
hoping that all 7.2 builds do not include it and all 7.3+ will!  I'm open to 
better way to handle the situation :-)


Thanks,


Steve...


-----Original Message-----
From: regalitare <[email protected]>
To: u2-users <[email protected]>
Sent: Wed, Aug 22, 2012 9:10 pm
Subject: [U2]  callHTTP creating Header for Host,


Greetings

I am working on an issue with UniData but I suspect it possibly affects both 
flavors.  I am making a callHTTP GET request to a server that has virtual 
hosts.  
Basically, one server on a single IP address has multiple named web sites.  On 
UniData 7.3.0 Personal Edition on Windows I tested my code and it works fine.  
On UniData 7.2.10 on Windows it came up with the "default" web site (same as if 
I just use the IP address instead of the FQDN) instead of mine that was named 
in 
the URL.  I suspected the "Host" header that is required to be sent for 
HTTP/1.1 
protocol might be missing on UniData 7.2.

So, I added this line to the code to set the header:

CMD.STATUS = setRequestHeader(RHANDLE,"Host",HOST.AND.PORT)

And voila!  On 7.2 it started working properly!  But it broke 7.3!  On 7.3 it 
brings up the default web site if I explicitly set that header.

Is this a known bug/issue?  Is there something I should do to work around it 
now 
so that a UniData upgrade won't bite me?  I've thought about reverting to the 
old socket interface but I'd like to use callHTTP if it is "stable" since it is 
so convenient.

Thanks,

Steve...

--
Steve Kneizys

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

 

_______________________________________________
U2-Users mailing list
[email protected]
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to