mirror of
https://github.com/lunarmodules/luasocket.git
synced 2025-04-23 17:06:47 +02:00
Compare commits
5 Commits
24528134fd
...
6679ff3344
Author | SHA1 | Date | |
---|---|---|---|
|
6679ff3344 | ||
|
e3ca4a767a | ||
|
b281e6f717 | ||
|
784b0631e1 | ||
|
a1b5d3abd1 |
@ -60,7 +60,7 @@ An URL is defined by the following grammar:
|
|||||||
|
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<tt>
|
<tt>
|
||||||
<url> ::= [<scheme>:][//<authority>][/<path>][;<params>][?<query>][#<fragment>]<br>
|
<url> ::= [<scheme>:][//<authority>][/<path>][?<query>][#<fragment>]<br>
|
||||||
<authority> ::= [<userinfo>@]<host>[:<port>]<br>
|
<authority> ::= [<userinfo>@]<host>[:<port>]<br>
|
||||||
<userinfo> ::= <user>[:<password>]<br>
|
<userinfo> ::= <user>[:<password>]<br>
|
||||||
<path> ::= {<segment>/}<segment><br>
|
<path> ::= {<segment>/}<segment><br>
|
||||||
@ -225,7 +225,6 @@ parsed_url = {<br>
|
|||||||
scheme = <i>string</i>,<br>
|
scheme = <i>string</i>,<br>
|
||||||
authority = <i>string</i>,<br>
|
authority = <i>string</i>,<br>
|
||||||
path = <i>string</i>,<br>
|
path = <i>string</i>,<br>
|
||||||
params = <i>string</i>,<br>
|
|
||||||
query = <i>string</i>,<br>
|
query = <i>string</i>,<br>
|
||||||
fragment = <i>string</i>,<br>
|
fragment = <i>string</i>,<br>
|
||||||
userinfo = <i>string</i>,<br>
|
userinfo = <i>string</i>,<br>
|
||||||
@ -255,7 +254,6 @@ parsed_url = url.parse("ftp://root:passwd@unsafe.org/pub/virus.exe;type=i")
|
|||||||
-- scheme = "ftp",
|
-- scheme = "ftp",
|
||||||
-- authority = "root:passwd@unsafe.org",
|
-- authority = "root:passwd@unsafe.org",
|
||||||
-- path = "/pub/virus.exe",
|
-- path = "/pub/virus.exe",
|
||||||
-- params = "type=i",
|
|
||||||
-- userinfo = "root:passwd",
|
-- userinfo = "root:passwd",
|
||||||
-- host = "unsafe.org",
|
-- host = "unsafe.org",
|
||||||
-- user = "root",
|
-- user = "root",
|
||||||
|
@ -207,7 +207,6 @@ local function adjusturi(reqt)
|
|||||||
if not reqt.proxy and not _M.PROXY then
|
if not reqt.proxy and not _M.PROXY then
|
||||||
u = {
|
u = {
|
||||||
path = socket.try(reqt.path, "invalid path 'nil'"),
|
path = socket.try(reqt.path, "invalid path 'nil'"),
|
||||||
params = reqt.params,
|
|
||||||
query = reqt.query,
|
query = reqt.query,
|
||||||
fragment = reqt.fragment
|
fragment = reqt.fragment
|
||||||
}
|
}
|
||||||
|
@ -16,13 +16,6 @@
|
|||||||
|
|
||||||
#define UNIXDGRAM_DATAGRAMSIZE 8192
|
#define UNIXDGRAM_DATAGRAMSIZE 8192
|
||||||
|
|
||||||
/* provide a SUN_LEN macro if sys/un.h doesn't (e.g. Android) */
|
|
||||||
#ifndef SUN_LEN
|
|
||||||
#define SUN_LEN(ptr) \
|
|
||||||
((size_t) (((struct sockaddr_un *) 0)->sun_path) \
|
|
||||||
+ strlen ((ptr)->sun_path))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*=========================================================================*\
|
/*=========================================================================*\
|
||||||
* Internal function prototypes
|
* Internal function prototypes
|
||||||
\*=========================================================================*/
|
\*=========================================================================*/
|
||||||
@ -42,8 +35,8 @@ static int meth_receivefrom(lua_State *L);
|
|||||||
static int meth_sendto(lua_State *L);
|
static int meth_sendto(lua_State *L);
|
||||||
static int meth_getsockname(lua_State *L);
|
static int meth_getsockname(lua_State *L);
|
||||||
|
|
||||||
static const char *unixdgram_tryconnect(p_unix un, const char *path);
|
static const char *unixdgram_tryconnect(p_unix un, const char *path, size_t len);
|
||||||
static const char *unixdgram_trybind(p_unix un, const char *path);
|
static const char *unixdgram_trybind(p_unix un, const char *path, size_t len);
|
||||||
|
|
||||||
/* unixdgram object methods */
|
/* unixdgram object methods */
|
||||||
static luaL_Reg unixdgram_methods[] = {
|
static luaL_Reg unixdgram_methods[] = {
|
||||||
@ -133,13 +126,12 @@ static int meth_send(lua_State *L)
|
|||||||
static int meth_sendto(lua_State *L)
|
static int meth_sendto(lua_State *L)
|
||||||
{
|
{
|
||||||
p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1);
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1);
|
||||||
size_t count, sent = 0;
|
size_t count, sent, len = 0;
|
||||||
const char *data = luaL_checklstring(L, 2, &count);
|
const char *data = luaL_checklstring(L, 2, &count);
|
||||||
const char *path = luaL_checkstring(L, 3);
|
const char *path = luaL_checklstring(L, 3, &len);
|
||||||
p_timeout tm = &un->tm;
|
p_timeout tm = &un->tm;
|
||||||
int err;
|
int err;
|
||||||
struct sockaddr_un remote;
|
struct sockaddr_un remote;
|
||||||
size_t len = strlen(path);
|
|
||||||
|
|
||||||
if (len >= sizeof(remote.sun_path)) {
|
if (len >= sizeof(remote.sun_path)) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
@ -148,7 +140,7 @@ static int meth_sendto(lua_State *L)
|
|||||||
}
|
}
|
||||||
|
|
||||||
memset(&remote, 0, sizeof(remote));
|
memset(&remote, 0, sizeof(remote));
|
||||||
strcpy(remote.sun_path, path);
|
memcpy(remote.sun_path, path, len);
|
||||||
remote.sun_family = AF_UNIX;
|
remote.sun_family = AF_UNIX;
|
||||||
timeout_markstart(tm);
|
timeout_markstart(tm);
|
||||||
#ifdef UNIX_HAS_SUN_LEN
|
#ifdef UNIX_HAS_SUN_LEN
|
||||||
@ -264,18 +256,22 @@ static int meth_dirty(lua_State *L) {
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* Binds an object to an address
|
* Binds an object to an address
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
static const char *unixdgram_trybind(p_unix un, const char *path) {
|
static const char *unixdgram_trybind(p_unix un, const char *path, size_t len) {
|
||||||
struct sockaddr_un local;
|
struct sockaddr_un local;
|
||||||
size_t len = strlen(path);
|
int err;
|
||||||
if (len >= sizeof(local.sun_path)) return "path too long";
|
if (len >= sizeof(local.sun_path)) return "path too long";
|
||||||
memset(&local, 0, sizeof(local));
|
memset(&local, 0, sizeof(local));
|
||||||
strcpy(local.sun_path, path);
|
memcpy(local.sun_path, path, len);
|
||||||
local.sun_family = AF_UNIX;
|
local.sun_family = AF_UNIX;
|
||||||
size_t addrlen = SUN_LEN(&local);
|
|
||||||
#ifdef UNIX_HAS_SUN_LEN
|
#ifdef UNIX_HAS_SUN_LEN
|
||||||
local.sun_len = addrlen + 1;
|
local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
|
||||||
|
+ len + 1;
|
||||||
|
err = socket_bind(&un->sock, (SA *) &local, local.sun_len);
|
||||||
|
|
||||||
|
#else
|
||||||
|
err = socket_bind(&un->sock, (SA *) &local,
|
||||||
|
sizeof(local.sun_family) + len);
|
||||||
#endif
|
#endif
|
||||||
int err = socket_bind(&un->sock, (SA *) &local, addrlen);
|
|
||||||
if (err != IO_DONE) socket_destroy(&un->sock);
|
if (err != IO_DONE) socket_destroy(&un->sock);
|
||||||
return socket_strerror(err);
|
return socket_strerror(err);
|
||||||
}
|
}
|
||||||
@ -283,8 +279,9 @@ static const char *unixdgram_trybind(p_unix un, const char *path) {
|
|||||||
static int meth_bind(lua_State *L)
|
static int meth_bind(lua_State *L)
|
||||||
{
|
{
|
||||||
p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1);
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unixdgram{unconnected}", 1);
|
||||||
const char *path = luaL_checkstring(L, 2);
|
size_t len;
|
||||||
const char *err = unixdgram_trybind(un, path);
|
const char *path = luaL_checklstring(L, 2, &len);
|
||||||
|
const char *err = unixdgram_trybind(un, path, len);
|
||||||
if (err) {
|
if (err) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, err);
|
lua_pushstring(L, err);
|
||||||
@ -313,20 +310,23 @@ static int meth_getsockname(lua_State *L)
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* Turns a master unixdgram object into a client object.
|
* Turns a master unixdgram object into a client object.
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
static const char *unixdgram_tryconnect(p_unix un, const char *path)
|
static const char *unixdgram_tryconnect(p_unix un, const char *path, size_t len)
|
||||||
{
|
{
|
||||||
struct sockaddr_un remote;
|
struct sockaddr_un remote;
|
||||||
size_t len = strlen(path);
|
int err;
|
||||||
if (len >= sizeof(remote.sun_path)) return "path too long";
|
if (len >= sizeof(remote.sun_path)) return "path too long";
|
||||||
memset(&remote, 0, sizeof(remote));
|
memset(&remote, 0, sizeof(remote));
|
||||||
strcpy(remote.sun_path, path);
|
memcpy(remote.sun_path, path, len);
|
||||||
remote.sun_family = AF_UNIX;
|
remote.sun_family = AF_UNIX;
|
||||||
timeout_markstart(&un->tm);
|
timeout_markstart(&un->tm);
|
||||||
size_t addrlen = SUN_LEN(&remote);
|
|
||||||
#ifdef UNIX_HAS_SUN_LEN
|
#ifdef UNIX_HAS_SUN_LEN
|
||||||
remote.sun_len = addrlen + 1;
|
remote.sun_len = sizeof(remote.sun_family) + sizeof(remote.sun_len)
|
||||||
|
+ len + 1;
|
||||||
|
err = socket_connect(&un->sock, (SA *) &remote, remote.sun_len, &un->tm);
|
||||||
|
#else
|
||||||
|
err = socket_connect(&un->sock, (SA *) &remote,
|
||||||
|
sizeof(remote.sun_family) + len, &un->tm);
|
||||||
#endif
|
#endif
|
||||||
int err = socket_connect(&un->sock, (SA *) &remote, addrlen, &un->tm);
|
|
||||||
if (err != IO_DONE) socket_destroy(&un->sock);
|
if (err != IO_DONE) socket_destroy(&un->sock);
|
||||||
return socket_strerror(err);
|
return socket_strerror(err);
|
||||||
}
|
}
|
||||||
@ -334,8 +334,9 @@ static const char *unixdgram_tryconnect(p_unix un, const char *path)
|
|||||||
static int meth_connect(lua_State *L)
|
static int meth_connect(lua_State *L)
|
||||||
{
|
{
|
||||||
p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1);
|
p_unix un = (p_unix) auxiliar_checkgroup(L, "unixdgram{any}", 1);
|
||||||
const char *path = luaL_checkstring(L, 2);
|
size_t len;
|
||||||
const char *err = unixdgram_tryconnect(un, path);
|
const char *path = luaL_checklstring(L, 2, &len);
|
||||||
|
const char *err = unixdgram_tryconnect(un, path, len);
|
||||||
if (err) {
|
if (err) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, err);
|
lua_pushstring(L, err);
|
||||||
|
@ -33,8 +33,8 @@ static int meth_getstats(lua_State *L);
|
|||||||
static int meth_setstats(lua_State *L);
|
static int meth_setstats(lua_State *L);
|
||||||
static int meth_getsockname(lua_State *L);
|
static int meth_getsockname(lua_State *L);
|
||||||
|
|
||||||
static const char *unixstream_tryconnect(p_unix un, const char *path);
|
static const char *unixstream_tryconnect(p_unix un, const char *path, size_t len);
|
||||||
static const char *unixstream_trybind(p_unix un, const char *path);
|
static const char *unixstream_trybind(p_unix un, const char *path, size_t len);
|
||||||
|
|
||||||
/* unixstream object methods */
|
/* unixstream object methods */
|
||||||
static luaL_Reg unixstream_methods[] = {
|
static luaL_Reg unixstream_methods[] = {
|
||||||
@ -181,13 +181,12 @@ static int meth_accept(lua_State *L) {
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* Binds an object to an address
|
* Binds an object to an address
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
static const char *unixstream_trybind(p_unix un, const char *path) {
|
static const char *unixstream_trybind(p_unix un, const char *path, size_t len) {
|
||||||
struct sockaddr_un local;
|
struct sockaddr_un local;
|
||||||
size_t len = strlen(path);
|
|
||||||
int err;
|
int err;
|
||||||
if (len >= sizeof(local.sun_path)) return "path too long";
|
if (len >= sizeof(local.sun_path)) return "path too long";
|
||||||
memset(&local, 0, sizeof(local));
|
memset(&local, 0, sizeof(local));
|
||||||
strcpy(local.sun_path, path);
|
memcpy(local.sun_path, path, len);
|
||||||
local.sun_family = AF_UNIX;
|
local.sun_family = AF_UNIX;
|
||||||
#ifdef UNIX_HAS_SUN_LEN
|
#ifdef UNIX_HAS_SUN_LEN
|
||||||
local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
|
local.sun_len = sizeof(local.sun_family) + sizeof(local.sun_len)
|
||||||
@ -204,8 +203,9 @@ static const char *unixstream_trybind(p_unix un, const char *path) {
|
|||||||
|
|
||||||
static int meth_bind(lua_State *L) {
|
static int meth_bind(lua_State *L) {
|
||||||
p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1);
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1);
|
||||||
const char *path = luaL_checkstring(L, 2);
|
size_t len;
|
||||||
const char *err = unixstream_trybind(un, path);
|
const char *path = luaL_checklstring(L, 2, &len);
|
||||||
|
const char *err = unixstream_trybind(un, path, len);
|
||||||
if (err) {
|
if (err) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, err);
|
lua_pushstring(L, err);
|
||||||
@ -234,14 +234,13 @@ static int meth_getsockname(lua_State *L)
|
|||||||
/*-------------------------------------------------------------------------*\
|
/*-------------------------------------------------------------------------*\
|
||||||
* Turns a master unixstream object into a client object.
|
* Turns a master unixstream object into a client object.
|
||||||
\*-------------------------------------------------------------------------*/
|
\*-------------------------------------------------------------------------*/
|
||||||
static const char *unixstream_tryconnect(p_unix un, const char *path)
|
static const char *unixstream_tryconnect(p_unix un, const char *path, size_t len)
|
||||||
{
|
{
|
||||||
struct sockaddr_un remote;
|
struct sockaddr_un remote;
|
||||||
int err;
|
int err;
|
||||||
size_t len = strlen(path);
|
|
||||||
if (len >= sizeof(remote.sun_path)) return "path too long";
|
if (len >= sizeof(remote.sun_path)) return "path too long";
|
||||||
memset(&remote, 0, sizeof(remote));
|
memset(&remote, 0, sizeof(remote));
|
||||||
strcpy(remote.sun_path, path);
|
memcpy(remote.sun_path, path, len);
|
||||||
remote.sun_family = AF_UNIX;
|
remote.sun_family = AF_UNIX;
|
||||||
timeout_markstart(&un->tm);
|
timeout_markstart(&un->tm);
|
||||||
#ifdef UNIX_HAS_SUN_LEN
|
#ifdef UNIX_HAS_SUN_LEN
|
||||||
@ -259,8 +258,9 @@ static const char *unixstream_tryconnect(p_unix un, const char *path)
|
|||||||
static int meth_connect(lua_State *L)
|
static int meth_connect(lua_State *L)
|
||||||
{
|
{
|
||||||
p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1);
|
p_unix un = (p_unix) auxiliar_checkclass(L, "unixstream{master}", 1);
|
||||||
const char *path = luaL_checkstring(L, 2);
|
size_t len;
|
||||||
const char *err = unixstream_tryconnect(un, path);
|
const char *path = luaL_checklstring(L, 2, &len);
|
||||||
|
const char *err = unixstream_tryconnect(un, path, len);
|
||||||
if (err) {
|
if (err) {
|
||||||
lua_pushnil(L);
|
lua_pushnil(L);
|
||||||
lua_pushstring(L, err);
|
lua_pushstring(L, err);
|
||||||
|
17
src/url.lua
17
src/url.lua
@ -125,7 +125,7 @@ end
|
|||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
-- Parses a url and returns a table with all its parts according to RFC 2396
|
-- Parses a url and returns a table with all its parts according to RFC 2396
|
||||||
-- The following grammar describes the names given to the URL parts
|
-- The following grammar describes the names given to the URL parts
|
||||||
-- <url> ::= <scheme>://<authority>/<path>;<params>?<query>#<fragment>
|
-- <url> ::= <scheme>://<authority>/<path>?<query>#<fragment>
|
||||||
-- <authority> ::= <userinfo>@<host>:<port>
|
-- <authority> ::= <userinfo>@<host>:<port>
|
||||||
-- <userinfo> ::= <user>[:<password>]
|
-- <userinfo> ::= <user>[:<password>]
|
||||||
-- <path> :: = {<segment>/}<segment>
|
-- <path> :: = {<segment>/}<segment>
|
||||||
@ -136,7 +136,7 @@ end
|
|||||||
-- table with the following fields, where RFC naming conventions have
|
-- table with the following fields, where RFC naming conventions have
|
||||||
-- been preserved:
|
-- been preserved:
|
||||||
-- scheme, authority, userinfo, user, password, host, port,
|
-- scheme, authority, userinfo, user, password, host, port,
|
||||||
-- path, params, query, fragment
|
-- path, query, fragment
|
||||||
-- Obs:
|
-- Obs:
|
||||||
-- the leading '/' in {/<path>} is considered part of <path>
|
-- the leading '/' in {/<path>} is considered part of <path>
|
||||||
-----------------------------------------------------------------------------
|
-----------------------------------------------------------------------------
|
||||||
@ -166,11 +166,6 @@ function _M.parse(url, default)
|
|||||||
parsed.query = q
|
parsed.query = q
|
||||||
return ""
|
return ""
|
||||||
end)
|
end)
|
||||||
-- get params
|
|
||||||
url = string.gsub(url, "%;(.*)", function(p)
|
|
||||||
parsed.params = p
|
|
||||||
return ""
|
|
||||||
end)
|
|
||||||
-- path is whatever was left
|
-- path is whatever was left
|
||||||
if url ~= "" then parsed.path = url end
|
if url ~= "" then parsed.path = url end
|
||||||
local authority = parsed.authority
|
local authority = parsed.authority
|
||||||
@ -203,7 +198,6 @@ function _M.build(parsed)
|
|||||||
--local ppath = _M.parse_path(parsed.path or "")
|
--local ppath = _M.parse_path(parsed.path or "")
|
||||||
--local url = _M.build_path(ppath)
|
--local url = _M.build_path(ppath)
|
||||||
local url = parsed.path or ""
|
local url = parsed.path or ""
|
||||||
if parsed.params then url = url .. ";" .. parsed.params end
|
|
||||||
if parsed.query then url = url .. "?" .. parsed.query end
|
if parsed.query then url = url .. "?" .. parsed.query end
|
||||||
local authority = parsed.authority
|
local authority = parsed.authority
|
||||||
if parsed.host then
|
if parsed.host then
|
||||||
@ -258,11 +252,8 @@ function _M.absolute(base_url, relative_url)
|
|||||||
relative_parsed.authority = base_parsed.authority
|
relative_parsed.authority = base_parsed.authority
|
||||||
if not relative_parsed.path then
|
if not relative_parsed.path then
|
||||||
relative_parsed.path = base_parsed.path
|
relative_parsed.path = base_parsed.path
|
||||||
if not relative_parsed.params then
|
if not relative_parsed.query then
|
||||||
relative_parsed.params = base_parsed.params
|
relative_parsed.query = base_parsed.query
|
||||||
if not relative_parsed.query then
|
|
||||||
relative_parsed.query = base_parsed.query
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
relative_parsed.path = absolute_path(base_parsed.path or "",
|
relative_parsed.path = absolute_path(base_parsed.path or "",
|
||||||
|
@ -99,8 +99,7 @@ check_parse_url{
|
|||||||
userinfo = "user:pass$%?#wd",
|
userinfo = "user:pass$%?#wd",
|
||||||
password = "pass$%?#wd",
|
password = "pass$%?#wd",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -113,8 +112,7 @@ check_parse_url{
|
|||||||
userinfo = "user:pass?#wd",
|
userinfo = "user:pass?#wd",
|
||||||
password = "pass?#wd",
|
password = "pass?#wd",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -127,8 +125,7 @@ check_parse_url{
|
|||||||
userinfo = "user:pass-wd",
|
userinfo = "user:pass-wd",
|
||||||
password = "pass-wd",
|
password = "pass-wd",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -141,8 +138,7 @@ check_parse_url{
|
|||||||
userinfo = "user:pass#wd",
|
userinfo = "user:pass#wd",
|
||||||
password = "pass#wd",
|
password = "pass#wd",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -155,8 +151,7 @@ check_parse_url{
|
|||||||
userinfo = "user:pass#wd",
|
userinfo = "user:pass#wd",
|
||||||
password = "pass#wd",
|
password = "pass#wd",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
}
|
}
|
||||||
check_parse_url{
|
check_parse_url{
|
||||||
@ -167,8 +162,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -182,8 +176,7 @@ check_parse_url{
|
|||||||
userinfo = "user:password",
|
userinfo = "user:password",
|
||||||
user = "user",
|
user = "user",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment",
|
fragment = "fragment",
|
||||||
}
|
}
|
||||||
@ -196,8 +189,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = ""
|
fragment = ""
|
||||||
}
|
}
|
||||||
@ -210,8 +202,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "",
|
query = "",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -224,8 +215,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -237,8 +227,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;",
|
||||||
params = "",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -264,8 +253,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/",
|
path = "/;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -287,8 +275,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -438,8 +425,7 @@ check_parse_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "userinfo",
|
userinfo = "userinfo",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -453,8 +439,7 @@ check_parse_url{
|
|||||||
userinfo = "user:password",
|
userinfo = "user:password",
|
||||||
user = "user",
|
user = "user",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -467,8 +452,7 @@ check_build_url {
|
|||||||
port = "port",
|
port = "port",
|
||||||
user = "user",
|
user = "user",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -478,8 +462,7 @@ check_build_url{
|
|||||||
host = "::FFFF:129.144.52.38",
|
host = "::FFFF:129.144.52.38",
|
||||||
port = "port",
|
port = "port",
|
||||||
user = "userinfo",
|
user = "userinfo",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -491,8 +474,7 @@ check_build_url{
|
|||||||
port = "port",
|
port = "port",
|
||||||
user = "user",
|
user = "user",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -503,8 +485,7 @@ check_build_url {
|
|||||||
host = "host",
|
host = "host",
|
||||||
user = "user",
|
user = "user",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -514,8 +495,7 @@ check_build_url {
|
|||||||
scheme = "scheme",
|
scheme = "scheme",
|
||||||
host = "host",
|
host = "host",
|
||||||
user = "user",
|
user = "user",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -524,8 +504,7 @@ check_build_url {
|
|||||||
url = "scheme://host/path;params?query#fragment",
|
url = "scheme://host/path;params?query#fragment",
|
||||||
scheme = "scheme",
|
scheme = "scheme",
|
||||||
host = "host",
|
host = "host",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -534,8 +513,7 @@ check_build_url {
|
|||||||
url = "scheme://host/path;params#fragment",
|
url = "scheme://host/path;params#fragment",
|
||||||
scheme = "scheme",
|
scheme = "scheme",
|
||||||
host = "host",
|
host = "host",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -573,9 +551,7 @@ check_build_url {
|
|||||||
user = "user",
|
user = "user",
|
||||||
userinfo = "not used",
|
userinfo = "not used",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -588,8 +564,7 @@ check_build_url {
|
|||||||
userinfo = "not used",
|
userinfo = "not used",
|
||||||
authority = "not used",
|
authority = "not used",
|
||||||
password = "password",
|
password = "password",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -601,8 +576,7 @@ check_build_url {
|
|||||||
port = "port",
|
port = "port",
|
||||||
userinfo = "user:password",
|
userinfo = "user:password",
|
||||||
authority = "not used",
|
authority = "not used",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
@ -611,8 +585,7 @@ check_build_url {
|
|||||||
url = "scheme://user:password@host:port/path;params?query#fragment",
|
url = "scheme://user:password@host:port/path;params?query#fragment",
|
||||||
scheme = "scheme",
|
scheme = "scheme",
|
||||||
authority = "user:password@host:port",
|
authority = "user:password@host:port",
|
||||||
path = "/path",
|
path = "/path;params",
|
||||||
params = "params",
|
|
||||||
query = "query",
|
query = "query",
|
||||||
fragment = "fragment"
|
fragment = "fragment"
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user