lua - 400 Bad Request: malformed Host header -


i trying query docker api using lua sockets. seeing 400 bad request: malformed host header error continuously when every query data. not sure what's wrong query. suggestions or appreciated.

i running docker version: 1.12.3 version.

local socket = require "socket" local socket_unix = require "socket.unix" local http = require "socket.http" local ltn12 = require "ltn12"  local resp_body = {}  local req_headers = {   ["user-agent"]      = http.useragent,   ["accept"]          = "application/json" }  local res, code , headers, status = http.request{   host ='/var/run/docker.sock',   path ="/version",   header = req_headers,   scheme = "http",   sink = ltn12.sink.table(resp_body),   create = socket_unix, }   if not res   return nil, code end print(resp_body) 


Comments

Popular posts from this blog

sql server - Cannot query correctly (MSSQL - PHP - JSON) -

php - trouble displaying mysqli database results in correct order -

C++ Linked List -