32 Commits

Author SHA1 Message Date
huojicha
58774183a7 [httpc] 解决几个ipv6下面的请求规范的问题 (#2149)
* 按照RFC 3986的规范处理ipv6 host的格式化问题,ipv6地址需要用 []括起来
参考: https://www.rfc-editor.org/rfc/rfc3986#section-3.2.2

* 解决ipv6格式不对的问题

* 只有域名的情况下才 set_ext_host_name
2026-04-01 15:45:33 +08:00
huojicha
6f84247f1f fix: improve hostname detection to support numeric-suffixed domains (#2147)
* fix: improve hostname detection to support numeric-suffixed domains

* 1.connect改为支持ipv6 2.check_protocol改为parse_url,语义更明确 3.解析域名时直接返回host_type
2026-03-30 20:47:15 +08:00
Cloud Wu
351d21d62c hostname should be nil if host is ip address, see #2125 2025-12-28 10:26:05 +08:00
Cloud Wu
2a5d6c38ae gen_interface needs hostname 2025-12-28 09:53:14 +08:00
Cloud Wu
e4a1250ebb rewrite httpc connect, see #2125 2025-12-27 22:53:23 +08:00
IAN.Z
bed435660e fix: httpc支持ipv6 (#2125)
* fix: httpc支持ipv6

* httpc ip:port解析放在c层

* lua-socket.c listen增加ip:port字符串解析, 相关cluster代码修改 #2124

* socketchannel changehost port可置空

* socketchannel changehost恢复port判空

* httpc解析域名加端口号逻辑优化

* 注释中字符串模式内容格式优化

---------

Co-authored-by: zhuyin.zhu <zhuyin.zhu@bytedance.com>
2025-12-27 17:11:52 +08:00
zhuilang
c2b391ed42 Update httpc.lua (#1962) 2024-07-27 00:42:15 +08:00
89372a257d https set extension:server_name (#1960)
Co-authored-by: root <root@DESKTOP-5DF4NN3.localdomain>
2024-07-24 11:55:05 +08:00
华仔
22df64244a 优化http出错抛出更详细的错误信息 (#1900)
* 优化http出错抛出更详细的错误信息

* 优化http err_info写法
2024-04-10 13:40:41 +08:00
robot
4030687400 在进行https握手时,会有小概率在进行密钥协商前,tcp流卡住,导至不能有效timeout行为 (#1842) 2023-12-20 13:07:38 +08:00
zhuilang
89b47f9372 modify httpc.request (#1823)
* modify httpc.request

这样可能更好点

* modify httpc.request
2023-11-17 19:49:42 +08:00
zhuilang
6249062c2d Update httpc.request (#1822) 2023-11-15 22:11:24 +08:00
zhuilang
987bb3df47 modify from http folder (#1470)
* delete unused var and add used arg

* use interface from stream
2021-09-01 07:12:27 +08:00
云风
54e733a76f Request stream (#1463)
* split request/response

* stream api

* fix: global variable (#1464)

* fix global variable

* fix global variable

* Add httpc.head

Co-authored-by: JTrancender <jie-email@jie-trancender.org>
2021-08-30 10:00:57 +08:00
colin
6ee8d23ac4 ssl request support sni(Server Name Indication) (#1460)
* ssl support sni(Server Name Indication)

* ssl support sni(Server Name Indication)
2021-08-23 16:54:01 +08:00
zixun
81a7c44a05 add ws/wss server and client support 2019-11-19 16:25:43 +08:00
Cloud Wu
7e42653f80 fix #1057 2019-07-29 16:54:49 +08:00
zixun
7746193b5f add https client and server support by bios 2019-03-14 10:36:02 +08:00
chengzhe
37157273ff http中connect可能会连接失败,不应当将错误的fd继续传递下去 2017-10-17 17:50:54 +08:00
Cloud Wu
f94ca6f4b3 add socket.disconnected(), used by socketchannle. see #715 2017-08-15 13:44:06 +08:00
Cloud Wu
6d81c2b818 use socket.shutdown where timeout 2017-08-01 09:35:16 +08:00
Cloud Wu
f1ed482001 move to skynet module 2017-06-01 11:29:07 +08:00
Cloud Wu
312943c6a0 connect timeout, see #611 2017-04-13 15:32:54 +08:00
Cloud Wu
ccb0e1b24c suppot httpc.timeout 2016-09-24 12:28:57 +08:00
Cloud Wu
d7a76c7c72 If no content-length, read all. see issue #431 2016-01-07 16:01:17 +08:00
Cloud Wu
c180036bed use async dns resolve in httpc, and dns resolve cache by ttl. see about issue #253 2015-11-25 13:09:41 +08:00
Cloud Wu
13d920e185 body may contain ascii 0, see issue #365 2015-10-27 15:40:15 +08:00
HuaYang Huang
75d9b07158 fix: httpc.get
:-(
此错误会导致httpc.get无法找到正确的虚拟主机
2015-04-29 20:18:13 +08:00
HuaYang Huang
ec1bca238e fix: httpc.post
调用httpc.post时,如果没有在header里面设置host时有问题
2015-04-01 17:54:22 +08:00
Cloud Wu
36ed8679b8 you can set host in httpc header 2015-03-30 09:29:22 +08:00
Cloud Wu
9bdc36526e close socket after request 2014-10-22 11:29:03 +08:00
Cloud Wu
dec2e6fe4c add httpc 2014-08-04 18:06:16 +08:00