Here are some outputs:
> h=require("socket.http")
nil invalid chunk size
> hdrs = {["USER-AGENT"]="uPNP/1.0"}
> print(h.request{url="" href="http://192.168.0.197:2869/dms_descr.xml]">http://192.168.0.197:2869/dms_descr.xml]],sink=ltn12.sink.file(io.stdout),headers = hdrs})
nil invalid chunk size
So that gives the same error for that file. For the other file:
nil closed
> hdrs = {["USER-AGENT"]="uPNP/1.0"}
> print(h.request{url="" href="http://192.168.0.197:49153/nasdevice.xml]">http://192.168.0.197:49153/nasdevice.xml]],sink=ltn12.sink.file(io.stdout),headers = hdrs})
<?xml version="1.0"?>............
...............................
</root>
nil closed
So the header USER-AGENT is required to get the xml file.
I added print after every :receive() statement in http.lua to print (7 in all) what was received and here is the output:
> h=require("socket.http")
> hdrs = {["USER-AGENT"]="uPNP/1.0"}
HTTP/
HTTP/1.1 200 OK
Content-Type: text/xml; charset=utf-8 nil
Transfer-Encoding: chunked nil
Last-Modified: Mon, 28 Apr 2014 13:21:44 GMT nil
Date: Thu, 17 Jul 2014 06:48:28 GMT nil
Server: NFLC/2.3 UPnP/1.0 DLNADOC/1.50 nil
Content-Length: 3422 nil
nil
nil
nil invalid chunk size