Commit Graph

201 Commits

Author SHA1 Message Date
Caleb Maclennan
784b0631e1
test(url): Update URL parsing expectations for params removal 2023-11-09 14:40:15 +03:00
Henri D
8c2ff7217e
fix(http): Allow relative redirect on https (#395)
Location header can now be relative: https://httpwg.org/specs/rfc9110.html#field.location
2022-10-08 09:42:36 +03:00
Thijs Schreijer
601ad8d59f
refactor: Address issues raised by linter 2022-03-19 17:13:15 +03:00
E. Westbrook
5b18e475f3 test/find-connect-limit: add missing "socket =" 2020-03-28 22:21:23 +00:00
E. Westbrook
743a5f1bcf test/udp-zero-length-send-recv: add missing "socket ="; use shebang "#!/usr/bin/env lua" 2020-03-28 22:21:23 +00:00
E. Westbrook
a7baf8dc25 test/udp-zero-length-send: add missing "socket ="; use shebang "#!/usr/bin/env lua" 2020-03-28 22:21:23 +00:00
E. Westbrook
c8b4fdf858 test/getoptions: guard calls with pcall(); check result of getoption"linger" 2020-03-28 22:21:23 +00:00
E. Westbrook
84e5336e8b test/tcp-getoptions: bugfix: missing "socket =" in require"socket" 2020-03-28 22:21:23 +00:00
Diego Nehab
699c36c019
Merge pull request #116 from linuxmaniac/master
Add "tcp-keepidle", "tcp-keepcnt" and "tcp-keepintvl" options
2019-02-24 17:55:27 -03:00
E. Westbrook
ca5398be09 url.lua:remove_dot_components(): use temporary NUL marker to reduce empty-segment special-case code 2018-08-21 12:17:12 -06:00
E. Westbrook
38d936ec0e url.lua:remove_dot_components(): empty path component double-dot corner case 2018-08-21 11:27:42 -06:00
E. Westbrook
5b862e6a3c url.lua:absolute_path(): ensure a separator between base_path and relative_path 2018-08-21 10:43:04 -06:00
E. Westbrook
7ccea58776 url.lua:remove_dot_components(): avoid overconsuming dot segments 2018-08-21 09:59:45 -06:00
E. Westbrook
c570a32c21 url.lua:remove_dot_components(): limit beginning-of-string double-dot corner case to prevent triple-dot activation and authority collision 2018-08-21 09:07:42 -06:00
E. Westbrook
c905b5d44f url.lua: separate remove_dot_components() from absolute_path(); also use in _M.absolute() even when not merging 2018-08-21 08:03:51 -06:00
E. Westbrook
17a95c126a url.lua:absolute_path(): fix issue #254, simplify, add more test cases 2018-08-19 11:32:42 -06:00
E. Westbrook
8fee636309 Add ltn12.source.table() 2018-06-05 00:00:39 -06:00
Herbert Leuwer
2d6a0f7bda fixed url parsing; postpone fragment parsing after authority parsing; added test cases to test/urltest.lua
fixed reference patterns in check_protect() to upper case hex letters
2017-11-22 09:30:12 +01:00
Diego Nehab
47e644031f Preserve path when parsing urls. 2017-03-20 16:56:15 -03:00
enginix
3a33c37b9c rename unix.tcp to unix.stream, unix.udp to unix.dgram 2016-12-25 23:33:10 +08:00
enginix
aa1b8cc9bc support datagram unix domain sockets 2016-06-24 21:33:19 +08:00
Diego Nehab
916b548240 Family agostic FTP and expose HTTP/FTP url parsing 2016-03-07 01:30:30 -03:00
Philipp Janda
9fe38c654f Don't swallow errors in finalizers. 2016-02-24 00:48:43 +01:00
mpeterv
fb713cdedb Add more tests for socket.try/protect 2016-02-21 12:09:58 +01:00
Diego Nehab
be67f63f4e Changed buffer-per-socket to buffer-per-operation.
This is a difficult tradeoff to measure. I think large
datagrams won't be used very frequently. So it is better to
not lock a large buffer to each socket object and instead
allocate and deallocate for each operation receiving a
datagram larger than UDP_DATAGRAMSIZE.
2015-10-06 11:33:50 +08:00
Diego Nehab
77bba625d7 Fixes suggested by @Florob in #147. 2015-08-25 15:41:40 -03:00
Diego Nehab
96965b179c New agnostic IPv4 IPv6 functions.
Also dealing with EPROTOTYPE Yosemite seems to be throwing
at us for no reason.
2015-08-22 19:52:01 -03:00
Diego Nehab
e75444ccd1 New compat.h module implements luaL_setfuncs.
Makes initialization code simpler everywhere.
2015-08-21 15:39:34 -03:00
Diego Nehab
ddf4292824 Out of the box support for Lua 5.3. 2015-02-18 20:51:37 -02:00
Victor Seva
2906d6a522 Add "tcp-keepidle", "tcp-keepcnt" and "tcp-keepintvl" options 2014-12-05 13:17:50 +01:00
Fabien Fleutot
480a818bf0 support multiple filters in ltn12.{sink,source}.chain() 2013-06-18 11:01:46 +02:00
Diego Nehab
7cad902bb7 Fix makefile and test_socket_error.lua 2013-06-12 21:45:15 +08:00
Diego Nehab
ebde49944b Unix domain tests still broken. 2013-05-30 17:59:28 +08:00
moteus
1de617e355 Add. Allow get error option to socket. 2013-05-29 14:33:27 +04:00
moteus
45ff0e1775 Fix. use table.unpack in mimetest on Lua 5.2. 2013-05-27 13:11:07 +04:00
moteus
920bc97629 Build with Lua 5.2 without LUA_COMPAT_MODULE flag.
LUASOCKET_USE_GLOBAL flag enable create global variables when load socket/mime modules.
2013-05-27 12:45:09 +04:00
moteus
bd51d8c1a5 Fix. Optional IPv6 test 2013-05-27 11:26:35 +04:00
moteus
e54f78c61c Fix. setsockname fails with "*" as host.
Add. test_bind.lua
2013-05-27 11:25:31 +04:00
moteus
56dbda39ed Fix. getaddrinfo returns garbage as address on Windows.
Add. test_getaddrinfo.lua
2013-05-27 11:20:52 +04:00
Diego Nehab
c28fa1d309 Merge pull request #27 from catwell/pull-noarg
fix more uses of arg
2013-04-17 19:38:21 -07:00
Gerardo Marset
56893e9dcd Use the length operator (#) instead of table.getn.
table.getn was deprecated in Lua 5.1 in favor of #, the length operator.
See: http://www.lua.org/manual/5.1/manual.html#7.2
2013-02-25 20:28:28 -02:00
Pierre Chapuis
33b4f0cfc7 remove uses of arg in the codebase 2013-01-23 19:13:32 +01:00
Diego Nehab
6368caeb5a Fix udp:setpeername("*")
There seems to be a curious difference between MacOS and
Linux and I am not sure if this is documented. When you
break a "connection" on Mac OS, you only eliminate the peer
association, but the local address remains bound. On Linux,
breaking a "connection" eliminates the binding to the local
address. Have you guys ever come accross this?

Another irritating difference is that connect() returns the
error EAFNOSUPPORT on Mac OS. I am going to ignore all
errors when the reason for calling connect() is simply to
break the "connection".
2012-08-23 19:31:15 -03:00
Diego Nehab
04be61f88d Test server exits gracefully at command of test client 2012-05-01 16:21:06 +08:00
Florian Zeitz
6de0aa54fd Update method list in tests 2012-04-29 21:03:28 +02:00
Florian Zeitz
cf4d29f86d Select loadstring or load for Lua 5.1/5.2 respectively 2012-04-29 20:46:35 +02:00
Florian Zeitz
46736a3355 Test method registration for IPv6 sockets 2012-04-29 20:44:15 +02:00
Diego Nehab
f960b3872a Making progress toward a release
Documented headers.lua
Update copyright date everywhere
Remove RCSID from files
Move version back to 2.1 rather than 2.1.1
Fixed url package to support ipv6 hosts
Changed "domain" to "family" in tcp and udp structures
Implemented getfamily methods
2012-04-23 00:18:45 +08:00
Sam Roberts
4b671f4551 Merge branch 'git-sam' into diego-sam-mwild-integration
Conflicts in options.c were just due to independent small functions
being close to each other.

unix.c in mwild was broken, it wasn't using LUASOCKET_API.

serial.c needed luaL_reg renamed, and to use LUASOCKET_API.

makefile didn't respect standard DESTDIR and prefix makefile
variables, and didn't allow LUAV variable to select lua version to build
against.

I've tested the top-level install-both target builds and installs
against both lua5.1 and lua5.2, but not done further testing.

Conflicts:
	README
	config
	gem/ltn012.tex
	makefile
	src/makefile
	src/options.c
	src/options.h
	src/tcp.c
	src/usocket.c
2012-04-11 14:18:20 -07:00
Sam Roberts
195b2a74bb On failure, exit with a message instead of blocking indefinitely. 2012-04-11 13:54:01 -07:00