1--! @
file src/lib/protocol/http_ginga.lua
2--! @
short HTTP ginga module
4--! @li @b specification: https:
7--! | feature/support |
this module | manoel campos |
9--! | Samsung TVs | yes | no |
10--! | Redirect 3xx | yes | no |
11--! | HTTPS protocol | handler error | no |
12--! | Timeout request | yes | no |
13--! | DNS Resolving | yes | no |
14--! | multi-request | yes, event loop | yes, corotines |
16--! @note @b Samsung Tvs have connections blocked when host is not cached in DNS
18--! @par Finite State Machine
20--! hide empty description
21--! state 0 as "no requests"
22--! state 1 as "DNS resolving": first request
23--! state 2 as "DNS disabled"
24--! state 3 as "DNS Idle"
25--! state 4 as "DNS resolving"
39--! "resolve": "8.8.8.8",
41--! "google.com": "8.8.8.8"
46--! "url": "google.com/search?q=pudim.com.br"
51--! "url": "pudim.com.br/"
56--! "url": "example.com/foo"
59--! "url": "example.com/bar"
64--! "connector.id.1" : {
65--! "url": "example.com/zig"
67--! "connector.id.2" : {
68--! "url": "example.com/zag"
73local http_util = require('src/lib/util/http')
74local lua_util = require('src/lib/util/lua')
77local function http_connect(self)
78 local params = http_util.url_search_param(self.param_list, self.param_dict)
79 local request, cleanup = http_util.create_request(self.method, self.p_uri..params)
80 .add_imutable_header('Host', self.p_host)
81 .add_imutable_header('Cache-Control', 'max-age=0')
82 .add_mutable_header('Accept', '*
local function file(self, file)
local function require(std, game, application)
local function install(std, game, application)
local function fixed_loop(std, game, application)
dequeue request
local function http_handler(self)
create request
local function event_loop(std, game, application, evt)
resolve request