I’m having problems to access the RPC server using Perl. I’m not sure if the problem is a my side, or on the RPC server side.
I’m running a Raspberry Pi with Wheezy, homegear version 0.3.1-2 (see https://forum.homegear.eu/viewtopic.php?f=4&t=4)
I wrote a very little test program in Perl which simply calls method “listDevices”. I run the program on a Windows PC which connects to my Raspberry Pi on Port 2001. The following error is reported:
[color=#BF0000]Unknown value for HTTP header “Connection”: TE, close Buffer: POST / HTTP/1.1[/color]
This is the full log from “homegear.err”, showing all HTTP header fields:
: : : 02/16/14 11:18:46.303 XML RPC Server: Could not process HTTP packet: Unknown value for HTTP header "Connection": TE, close Buffer: POST / HTTP/1.1 TE: deflate,gzip;q=0.3 Connection: TE, close Host: 192.168.0.19:2001 User-Agent: libwww-perl/6.05 Content-Type: text/xml Content-Length: 105 <?xml version="1.0"?> <methodCall> <methodName>listDevices</methodName> <params> </params> </methodCall>
To exclude other error reasons, I tried two different XMP-RPC Perl implementations (modules): “XML::RPC” and “Frontier::Client”, but either module produces the same error log. I am not too good in programming Perl (I’m still about learning Perl), but I guess since the example task is fairly simple there is not much I could do wrong - I just adapted example programs which I found for XMP-RPC-Clients.
So the first thing to analyze is: Is this a client side problem (my problem), or ist it a server side problem (Homegear problem)? For me it looks as if the RPC server not capable of handling requests coming form Perl modules. The error log states some unexpected HTTP header fields, regardless which RPC clinet implementation I use. I looked up the “TE” field in the HTTP specification, it seems to be correct usage of HTTP.
PS: I notice the documentation on your website is growing. Thanks! Good work, keep going on!