diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2019-11-23 00:05:30 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2019-11-23 00:05:30 +0800 |
commit | 6da2b175e20ed3c03b0dfcfc9046de1e0e5d4444 (patch) | |
tree | fdc22d78150fd1c5edc46732c8b151ccfefb519f /script/src/3rd/lua-uri/uri/http.lua | |
parent | d0ff66c9abe9d6abbca12fd811e0c3cb69c1033a (diff) | |
download | lua-language-server-6da2b175e20ed3c03b0dfcfc9046de1e0e5d4444.zip |
正路目录
Diffstat (limited to 'script/src/3rd/lua-uri/uri/http.lua')
-rw-r--r-- | script/src/3rd/lua-uri/uri/http.lua | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/script/src/3rd/lua-uri/uri/http.lua b/script/src/3rd/lua-uri/uri/http.lua deleted file mode 100644 index 91f7a57f..00000000 --- a/script/src/3rd/lua-uri/uri/http.lua +++ /dev/null @@ -1,32 +0,0 @@ -local M = { _NAME = "uri.http" } -local Util = require "uri._util" -local URI = require "uri" -Util.subclass_of(M, URI) - --- This implementation is based on RFC 2616 section 3.2 and RFC 1738 --- section 3.3. --- --- An HTTP URI with a 'userinfo' field is considered invalid, because it isn't --- shown in the syntax given in RFC 2616, and is explicitly disallowed by --- RFC 1738. - -function M.default_port () return 80 end - -function M.init (self) - if self:userinfo() then - return nil, "usernames and passwords are not allowed in HTTP URIs" - end - - -- RFC 2616 section 3.2.3 says that this is OK, but not that using the - -- redundant slash is canonical. I'm adding it because browsers tend to - -- treat the version with the extra slash as the normalized form, and - -- the initial slash is always present in an HTTP GET request. - if self:path() == "" then self:path("/") end - - return self -end - -Util.uri_part_not_allowed(M, "userinfo") - -return M --- vi:ts=4 sw=4 expandtab |