Commit graph

640 commits

Author SHA1 Message Date
Alexander Medvednikov
e7cad4f55d net,vweb: reduce allocations by ~80% 2023-11-11 01:10:34 +03:00
Roman
e4f55fb299
net.http: add socks5|http(s) proxy support [Linux] (#19676) 2023-11-09 23:56:16 +02:00
JalonSolov
01022e918e
flag,json,net: handle C calls in .v files (part of enabling -W impure-v as default) (#19779) 2023-11-06 14:27:00 +02:00
JalonSolov
29d60280c4
net.http: increase max_redirects to 16 (#19743) 2023-11-03 06:57:16 +02:00
Marco Santos
cee947ca9e
net.html: add note to parse and parse_file, that they will produce a DOM with lowercased tag names (#19720) 2023-11-01 12:28:21 +02:00
Joe C
a63f3e6f77
coroutines: use photon work_pool when nr_jobs > 0, and use photon libc fn wrappers (#19711) 2023-10-31 20:12:52 +03:00
Turiiya
e465f7490c
tests: cleanup legacy temp path (#19716) 2023-10-31 15:16:19 +02:00
yuyi
7681a0b46d
checker: check error of implementing other module private interface (fix #19620) (#19688) 2023-10-29 14:20:16 +02:00
shove
b3b68e418d
net.http: add a retry mechanism to http.fetch(), when the socket inevitably errors (#19660) 2023-10-27 12:27:54 +03:00
shove
0187b8e86a
net: ignore the SIGNPIPE signal at the socket level on macos (#19642) 2023-10-25 15:56:00 +03:00
Larpon
95509cf8fb
all: make all struct C.XYZ -> pub struct C.XYZ (#19651) 2023-10-25 15:01:50 +03:00
Roman
99e0832f17
net.http: support passing an HTTP proxy server in http.fetch (#19606) 2023-10-25 11:41:52 +03:00
Turiiya
f98bb863ab
vlib: fix typos and formatting (#19649) 2023-10-25 11:19:56 +03:00
Turiiya
9051ac8921
all: fix typos (#19634) 2023-10-23 21:21:15 +03:00
shove
166604f775
net, net.http: fixed some ssl library call return values judgment and handling (#19614) 2023-10-23 09:53:19 +03:00
Delyan Angelov
9cb8eac48a
net: use conv.hton* consistently, instead of $if tinyc { conv.hton16(port) } $else { u16(C.htons(port)) } 2023-10-20 06:52:03 +03:00
shove
772eb1ed12
net: fix handling of spurious wake-up signals, lost when calling select() in mbedtls and openssl (continue on C.EINTR) (#19600) 2023-10-19 16:19:37 +03:00
shove
07390ef4c4
net, net.http: fix C.FD_ISSET declaration (#19594) 2023-10-19 11:29:13 +03:00
Delyan Angelov
0a89f3082d
net.http: support passing on_running, on_stopped, on_closed callback functions to http.Server{}, as well as show_startup_message: false. (#19591) 2023-10-18 09:00:42 +03:00
pomid
7c4029c515
net.conv: add varinttou64 and u64tovarint functions, for the variable unsigned integer encoding, described in rfc9000 (for QUIC) (#19568) 2023-10-16 14:01:30 +03:00
Alexander Medvednikov
c947c140ee builtin: windows definitions 2023-10-15 07:43:57 +03:00
Alexander Medvednikov
545ee1ae23 checker: stricter rules for C types; C aliases; sokol fixes 2023-10-14 18:31:44 +03:00
Delyan Angelov
aba38d167b
net.openssl: fix ./v -cstrict -cc gcc-11 vlib/net/openssl/openssl_compiles_test.v 2023-10-07 11:36:29 +03:00
Delyan Angelov
c552ecf2b0
ci: fix vlib/net/tcp_test.v (change return type of one_shot_echo_server from ? to !) 2023-09-30 19:56:40 +03:00
Anton Zavodchikov
aa3832ceda
net.html: make public the CloseTagType enum (#19468) 2023-09-29 12:00:41 +03:00
Delyan Angelov
d93488b141
vlib: add net.http.file, allowing for v -e "import net.http.file; file.serve()" (#19348) 2023-09-15 00:45:02 +03:00
pancake
0244ae6fe9
net.ssl: implement SSLConn.peer_addr() (#19333) 2023-09-13 12:16:46 +03:00
shuankio
a0490f2b67
net.http: fix post error with https on windows (#19334) 2023-09-12 15:43:13 +03:00
yuyi
55ca8d8d8e
fmt: align the custom values of the enum fields (#19331) 2023-09-12 14:44:38 +03:00
Kim Shrier
2d4ccf6829
vlib: replace macros that resolve to __builtin_bswapnn calls for tcc (#19305)
The tcc compiler does not have __builtin_bswap64, __builtin_bswap32,
and __builtin_bswap16 functions.  The various hton and ntoh macros
resolve down to these functions.  When compiling with tcc, we should
be using the analogous functions from net.conv.
2023-09-08 07:42:28 +03:00
Delyan Angelov
c7ebc477b0
net.http: default explicitly to Method.get for http.Request and http.FetchConfig too 2023-09-06 12:03:19 +03:00
Delyan Angelov
330dda59c8
net.http: fix http.fetch(), without explicit method (default again to .get, not to .acl) 2023-09-06 11:59:47 +03:00
James Kirkwood
7927583de9
net.mbedtls: have shutdown close accepted connections too (#19164) 2023-08-30 21:52:42 +03:00
Turiiya
f755118e7c
vlib: update doc comments (#19231) 2023-08-30 08:50:00 +03:00
pancake
45e6e7d763
http: add support for stream connections, and custom .on_redirect, .on_progress, .on_finish callbacks to http.fetch() (#19184) 2023-08-23 20:42:05 +03:00
yuyi
815439a381
checker: fix assigning an array slice (fix #19120) (#19137) 2023-08-15 20:37:51 +03:00
Wertzui123
64cbbea074
net.websocket: fix typo in docs (ws -> wss) (#19143) 2023-08-15 13:48:57 +03:00
shove
11a8a46ade
tests: cleanup test cases (#19104) 2023-08-13 13:36:08 +03:00
Wertzui123
387f717004
websocket: initialize function pointers with nil (#19105) 2023-08-11 13:49:29 +03:00
shove
f4859ffb11
checker: fix missing or_block check for left expr of CallExpr(fix #19061) (#19074) 2023-08-08 09:06:03 +03:00
Lucas V. Araujo
ffdd5bb955
net.mbedtls: fix an error with in_memory_verification (fix #19051) (#19052) 2023-08-04 01:32:33 +03:00
Lucas V. Araujo
ecca3b155e
net.mbedtls: add SSLListener to allow creating SSL servers (#19022) 2023-08-01 20:45:50 +03:00
Delyan Angelov
177bb30013
net: change default of the socket used by net.listen_tcp, to dualstack, even if the OS has a different default. Allow changing the listen backlog too
With this change, example vweb programs, will continue to be available to both
ipv6 and ipv4 connections from the same machine, even after doing (on linux):
`echo 1 | sudo tee /proc/sys/net/ipv6/bindv6only`

Previously, after that, vweb programs responded only to ipv6 connections, but not to ipv4 ones,
i.e. opening http://127.0.0.1:8082/ stopped working, for `v run examples/vweb/vweb_example.v` .

Note: GO web servers have the same behaviour, which is convenient for development/testing,
since it makes the programs more consistent and robust in the face of OS settings changes.
2023-08-01 11:32:08 +03:00
Kim Shrier
fd81bae361
net.websocket: remove unnecessary manual frees of static strings (#19009) 2023-07-31 21:23:33 +03:00
Delyan Angelov
41f99c1abf
tools: add cmd/tools/show_ancient_deprecations.v, to cleanup ancient functionality, deprecated over an year ago (#18946) 2023-07-22 19:13:58 +03:00
JalonSolov
c3ff4b2f85
net.conv: rename functions to match other langs, making them easier t… (#18937) 2023-07-22 09:11:01 +03:00
l-m
36d45c6d14
net.http.chunked: return !string on decode (#18928) 2023-07-21 16:37:55 +03:00
Delyan Angelov
ef049839ab
ci: fix failing tests-sanitize-memory-clang (regression after 9047f7c) 2023-07-18 02:35:01 +03:00
alexferl
c2dc1ca706
net.http: make listener public, and add addr in Server struct (#18871) 2023-07-16 15:42:30 +03:00
Delyan Angelov
9047f7c9a8
vweb: fix parsing of form fields, send with multipart/form-data (by JS fetch) 2023-07-14 16:20:02 +03:00