lua: Add quvi.metainfo function
This function may be used to send a HTTP HEAD request to the server. The
function will return: quvi code, quvi error message, server response code,
content-type and content-length in a table.
For example:
local C = require 'quvi/const'
local o = { [C.qoo_croak_if_error] = false }
local r = quvi.metainfo(URL, o)
if r.response_code ==404 then
r = quvi.metainfo(URL2, o)
if #r.error_message ==0 then
for k,v in pairs(r) do print(k,v) end
else
error(r.error_message)
end
end
See also:
* http://article.gmane.org/gmane.comp.web.flash.quvi/160
Signed-off-by: Toni Gundogdu <legatvs@gmail.com>