Commit Graph

99 Commits

Author SHA1 Message Date
98be8d9fc1 chore(http): Correct typos in error message and code comments (#423) 2024-02-12 11:28:01 +03:00
fa69770e52 fix(http): Use the right protocol for proxies (#386) 2023-11-23 08:01:29 +03:00
13f2b3c663 fix(http): Correct receiveheaders() handling of folded values (#420) 2023-11-13 23:33:26 +03:00
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
2a76cb906c http.lua: set transfer-encoding if source and no content-length
If a source is specified without a content-length header, LuaSocket
sends the data in the chunked transfer coding; however, it doesn't set
the transfer-encoding header.  While I recognize that the user can set
this manually, this is a gotcha that has caught me multiple times.

RFC7230, section 3.3.3
  (https://tools.ietf.org/html/rfc7230#section-3.3.3)
is clear about this; if neither content-length nor transfer-encoding
chunked are specified, the request message body length is zero.  While
some servers may ignore this, I have encountered several that follow
the RFC in this regard, most recently golang's net/http.
2022-03-22 09:38:14 +01:00
601ad8d59f refactor: Address issues raised by linter 2022-03-19 17:13:15 +03:00
297f9d0277 bugfix: http.lua multischeme change that got dropped during PR conflict resolution 2019-02-28 18:40:30 -07:00
2a467001f6 http.lua: Error informatively if insufficient LuaSec support 2019-02-24 16:24:42 -07:00
e587800164 socket.http.request(): simultaneous support for http and https URL schemes, with caller-adjustable scheme-to-transport mappings (default "socket.http" and "ssl.https") 2019-02-24 15:23:16 -07:00
fa807f3ffd Merge pull request #246 from xyida/yoda
Fixed an issue that was mistaken for HTTP 0.9 when timeout
2019-02-24 18:01:33 -03:00
b8f088e868 Merge pull request #258 from ewestbrook/luasec117
http.lua: if default for scheme, omit port number in "Host:" header
2019-02-24 17:48:00 -03:00
09ff9b650c http.lua: allow override of hard-coded 5 max redirects 2019-02-23 12:23:17 -07:00
686f2ce822 http.lua: if default for scheme, omit port number in "Host:" header 2019-02-20 02:42:40 -07:00
4a3504612c Fixed an issue that was mistaken for HTTP 0.9 when timeout 2018-04-26 16:39:33 +08:00
b9f6fd215a URL-decode user password before adding to authorization header. 2016-04-12 00:04:21 +01:00
916b548240 Family agostic FTP and expose HTTP/FTP url parsing 2016-03-07 01:30:30 -03:00
5b4b915879 Remove global PORT. Fix https redirect. 2016-03-04 16:16:41 -03:00
46d7e75f3e Merge pull request #96 from chastabor/master
Generate headers before proxy changes host and port
2015-08-24 16:41:24 -03:00
d80bb0d82b Fix Host: header according to RFC7230 2014-07-15 14:49:20 -03:00
2314235b3a Add proxy authentication headers if present. 2014-03-27 14:40:04 -05:00
36aa87e031 Generate headers before proxy changes host and port 2014-03-21 14:25:44 -05:00
87d72dce4e include port in default Host header
See RFC 2616 section 14.23.
2013-08-14 14:41:57 +02:00
1f9ccb2b58 http: look for PROXY in _M, not as a global 2013-07-05 18:00:29 +02:00
ddf88aca09 http: do not set global TIMEOUT 2013-07-05 17:59:52 +02:00
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
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
2778766d67 Preliminary IPv6 support for v2.1 2012-04-11 13:25:11 -07:00
bce60be30f Decent makefiles! 2009-05-27 09:31:38 +00:00
d1a72435d5 New release. 2007-10-13 23:55:20 +00:00
be2e467929 Couple bug fixes. 2007-03-12 04:08:40 +00:00
e8650bbf16 http.request was using old host header during redirects. 2006-04-13 07:00:24 +00:00
be57b387d2 Stupid bug was reusing the nreqt.headers.host during redirect. 2006-04-12 08:04:09 +00:00
e9d477aba3 Final patches... 2006-04-03 03:10:56 +00:00
93806208c7 Updates for 2.0.1 on the way. 2006-03-19 21:22:21 +00:00
09ad4b299c Chose option 1) for http.lua.
Need to fix everything to make sure it works with the new compat-5.1
2006-03-14 09:04:15 +00:00
6248b915cb Fixing bugs... 2006-03-13 07:16:39 +00:00
d55a5826e8 Few tweaks in installation, some missing files, etc. 2005-11-22 08:33:29 +00:00
72eceedc62 Bugs sent by David. 2005-10-05 03:16:17 +00:00
773e35ced3 Compiled on Windows. Fixed a bunch of stuff. Almost ready to release.
Implemented a nice dispatcher! Non-blocking check-links and forward server
use the dispatcher.
2005-08-23 05:53:14 +00:00
0c3cdd5ef2 Final push for release... 2005-08-12 05:56:32 +00:00
4d455c6206 Using core.so instead of csocket.so and cmime.so. 2005-06-17 04:04:55 +00:00
65c35845c5 Working on the manual. 2005-06-14 04:29:23 +00:00
8b114f3bf4 Stupid bug in http.lua. 2005-06-12 22:02:21 +00:00
63e3d7c5b0 Forward server works for multiple tunnels.
Http.lua has been patched to support non-blocking everything.
Makefile for linux has been updated with new names.
2005-03-10 02:15:04 +00:00
7350bad6f4 Just to check out in the office. 2005-02-27 18:30:32 +00:00
97b26e0b66 Almost ready to release beta3 2005-01-02 22:44:00 +00:00
a8254e94f8 Last line of modules was simplified. 2004-12-23 23:17:01 +00:00
2f970d782e Changes due to new compat-5.1 2004-12-23 22:32:12 +00:00
6abfbc742b Host is overridable. 2004-11-28 19:53:17 +00:00
7c97e8e40a Almost ready for beta3 2004-11-27 07:58:04 +00:00