1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00
Commit Graph

416 Commits

Author SHA1 Message Date
yuyi
41dbd12bc4
tests: make error handling the same as the main function (#15825) 2022-09-21 19:45:43 +03:00
Delyan Angelov
f922ed0941
tests: unify all temporary files/folders under $VTMP/v, that can be cleaned by v wipe-cache (#15774) 2022-09-16 04:56:19 +03:00
shove
8b962f8446
checker: fix nested struct reference type field initialized check. (fix: #15741) (#15752) 2022-09-15 07:59:31 +03:00
flopetautschnig
9641ced901
vweb.csrf: add a README.md, correct doc comments for public functions (#15697) 2022-09-08 13:20:29 +03:00
flopetautschnig
1c63ce479c
vweb: adding a vweb.csrf protection module (#15586) 2022-09-06 13:18:39 +03:00
Hitalo de Jesus do Rosário Souza
797bdd5e98
vweb: document the .query field (#15572) 2022-08-28 09:55:18 +03:00
Hitalo de Jesus do Rosário Souza
eafbf335cf
docs: improve vlib/vweb/README.md (#15146) 2022-08-20 12:06:24 +03:00
Alexander Medvednikov
46f32fc10c checker: require unsafe for free() 2022-08-20 08:03:07 +03:00
yuyi
275a997ec1
vweb: fix vweb static url (#15396) 2022-08-11 08:28:47 +03:00
Emily Hudson
fd1b6efea6
net: add failed addresses + details on connect errors, make connect more robust in the default non blocking mode (#15364) 2022-08-07 10:40:05 +03:00
yuyi
cc43a23f29
vweb: check invalid port number (#15016) 2022-07-11 07:55:33 +03:00
ghosttk
eb10cc9606
vweb: fix '/' in scan_static_directory (#14940) 2022-07-04 15:32:44 +03:00
Alexander Medvednikov
b5f2636b73 Revert "vweb: remove the extra '/' in scan_static_directory (#14806)"
This reverts commit 8172fecb51.
2022-07-02 11:38:24 +03:00
ghosttk
8172fecb51
vweb: remove the extra '/' in scan_static_directory (#14806) 2022-06-21 15:13:09 +03:00
yuyi
de136f6baf
checker: improve pub struct check (fix #14446) (#14777) 2022-06-19 17:42:22 +03:00
Delyan Angelov
4b3c3d9082
checker: add error for if c >= A && c <= Z { in non generic functions 2022-06-07 20:43:31 +03:00
Alexander Medvednikov
a8461a900d vweb: use http.Cookie 2022-06-04 06:52:46 +03:00
Hunam
41414b5d5f
vlib: add net.http.mime (#14516) 2022-06-02 18:07:25 +03:00
Hunam
78d1b7f4ef
net.http: Response.text -> Response.body (#14478) 2022-05-29 20:27:18 +03:00
Daniel Däschle
d679146a80
fmt: remove space in front of ? and ! (#14366) 2022-05-13 06:56:21 +03:00
Delyan Angelov
8788512c4d
checker: make using err.msg and err.code produce an *actual* notice, even with the present compatibility hack (will be *removed* in 2022-06-01) 2022-04-12 14:56:02 +03:00
crthpl
b232a3b0d1
cgen: fix .filter() and .map() on shared arrays (#13954) 2022-04-07 18:05:11 +03:00
Nick Treleaven
a87cd9663e
vdoc: highlight inline examples for -f html (#13879) 2022-03-31 19:32:32 +03:00
Delyan Angelov
9ad64b0bd8
vweb: support -d trace_request and -d trace_response 2022-03-21 19:48:47 +02:00
Delyan Angelov
3bae489e35
examples: make the vweb_assets.v example more robust (always change work folder to the folder of the executable). Document the vweb.Context.handle_static behaviour. 2022-03-21 19:05:18 +02:00
Delyan Angelov
ef5ea0ef21
ci: fix vweb failures (restore the ability to *force* vweb to listen to *only* local interfaces) 2022-02-18 10:18:04 +02:00
Anton Zavodchikov
da9331f8ff
vweb: support ipv6 (#13498) 2022-02-17 23:13:36 +03:00
Tarcisio Gruppi
f68144774d
fmt: fix map missing a comma after enum keys, leading to non parsable code (#13481) 2022-02-16 21:08:29 +02:00
Tim Basel
9d0a5942ac
builtin: change IError msg and code to methods + fix vlib, add a deprecation notice for the old usages (#13041) 2022-02-11 15:52:33 +02:00
Vincenzo Palazzo
0d1d259bb4
net.urllib: keep the query parameter order (#13405) 2022-02-09 17:36:12 +02:00
Asher
47ee292ba4
vweb: make Context.mount_static_folder_at more robust (#13361) 2022-02-05 15:10:26 +02:00
Delyan Angelov
b2c299da48
vweb: support vweb.run_at(app, localhost, 8099) (#13337) 2022-02-01 18:41:12 +02:00
Delyan Angelov
fa6f7d4c83
os: add os.quoted_path/1, use it consistently for running V itself 2022-01-22 21:13:28 +02:00
Alexander Medvednikov
59ed4be49a all: update copyright year 2022-01-04 12:21:12 +03:00
Toby Webb
ef16a8ec54
vweb: add json_pretty method (#12745) 2021-12-07 01:31:17 +03:00
Delyan Angelov
8a971c3bf7
ci,vweb: fix hard coded data in vweb_test.v 2021-11-10 18:41:25 +02:00
xiao xigua
108644d260
vweb: add file method to vweb.Context, make the existing json method generic (#12211) 2021-10-18 18:25:06 +03:00
Alexander Medvednikov
cfc56b24fb vweb: fix [post] route matching 2021-10-12 08:18:04 +03:00
Alexander Medvednikov
da58ba0d5c vweb: populate action method params with form values 2021-10-12 07:10:12 +03:00
Anton Zavodchikov
4d7bb95c2f
vweb: add a vweb_global attribute (#12064) 2021-10-12 06:35:36 +03:00
Anton Zavodchikov
895daf297f
vweb: router refactor (#12041) 2021-10-03 16:26:44 +03:00
yuyi
108a01d65f
fmt: fix unnecessary line break in array init (fix #11448) (#11562) 2021-09-21 16:20:09 +03:00
Alexander Medvednikov
90e04d03b2 net.http: fix request_test.v 2021-09-11 06:16:00 +03:00
Alexander Medvednikov
1546090131 vweb: remove a duplicate function parse_multipart_form 2021-09-11 04:21:10 +03:00
Adam Oates
1b262c4f1d
vweb: show correct page on http error 404 (#11355) 2021-08-31 21:36:26 +03:00
Alexander Medvednikov
858ba25d55 os: make chdir() return error 2021-08-28 09:35:39 +03:00
Miccah
2cb0db633d
vweb: use Response struct for 302 response (#11245) 2021-08-20 01:13:36 +03:00
Jordan Liese
a9fb24cb5f
vweb: fix missing newline in redirect header string (#11242) 2021-08-19 14:58:57 +03:00
JalonSolov
1dee4f25fd
vweb: add more common mime types (#11226) 2021-08-18 08:51:18 +03:00
Delyan Angelov
f96b81b53a
ci: fix failing vweb_test.v 2021-08-17 18:57:04 +03:00
Miccah
1a7ba6f6d4
vweb: fix catchall route (#11168) 2021-08-12 19:05:50 +03:00
Delyan Angelov
efa8dcf4d2
time: turn Time.unix to i64, so it can represent times before 1970-01-01, fix time operators, add more tests (#11050) 2021-08-04 13:12:02 +03:00
Daniel Däschle
800c0e5092
vlib: remove deprecated map{} usages as well as deprecated functions (#11035) 2021-08-04 12:44:41 +03:00
Alexander Medvednikov
80976e640c vweb: remove init_server() from all examples, tutorials, and tests 2021-08-03 16:03:16 +03:00
Alexander Medvednikov
f879b3e221 ci: run gitly 2021-08-03 15:41:52 +03:00
shadow
66bc8bc0cb
vlib: remove many deprecated functions (#10972) 2021-07-28 09:22:19 +03:00
Miccah
a0e27d3fd9
net.http: refactor the Response struct (#10922) 2021-07-24 20:47:45 +03:00
Miccah
1a6a7a678a
vweb: change Context.headers from string to struct Header (#10749) 2021-07-18 12:21:07 +03:00
Miccah
c3c420a41c
vweb: remove chunked encoding support in server responses (#10750) 2021-07-13 15:47:16 +03:00
shadowninja55
7694afa44c
checker: check that mut args are lvalues (#10779) 2021-07-13 08:06:39 +03:00
Miccah
3039092b89
net.http: add header_from_map and join functions (#10747) 2021-07-12 12:16:41 +03:00
Miccah
44e78a6301
vweb: use http.Response constants instead of strings (#10730) 2021-07-10 11:58:07 +03:00
Alexander Medvednikov
1469b47f7d vweb: free app object for each request 2021-06-24 01:37:06 +03:00
Tomas Hellström
46eb6befd5
vweb,net: just log errors in accept() instead of panic-ing, add time.sleep(1ms) after each retry in select (#10489) 2021-06-17 10:41:26 +03:00
Miccah
6a19a13812
vweb: re-enable concurrency and fix the counter example (#10484) 2021-06-17 02:08:02 +03:00
Alexander Medvednikov
ae014ad06d vweb: add a missing check 2021-06-16 23:35:14 +03:00
Alexander Medvednikov
eacdd0d7e1 comptime: fix $(field.name) in $for; vweb: shared fields 2021-06-16 20:33:39 +03:00
Dialga
7201d5db59
vweb: fix parsing form data (#10468) 2021-06-15 18:28:16 +03:00
Emily Hudson
535dcac8fa
net: ipv6 support, merge unix+ip;[pack:x] attribute (#9904) 2021-06-13 23:53:38 +03:00
Delyan Angelov
eac1e25c5d
strings: simplify Builder (#10263) 2021-05-31 14:21:06 +03:00
Alexander Medvednikov
dcfea5c69b vweb: detect mime type automatically in serve_static() 2021-05-22 07:02:25 +03:00
Alexander Medvednikov
f09a5135e9 checker: handle builtin enum init correctly 2021-05-20 03:14:32 +03:00
Alexander Medvednikov
664f220f40 vweb: a minor readme update 2021-05-17 08:51:52 +03:00
Alexander Medvednikov
ed6ad728d9 vweb: fix serving static files 2021-05-16 04:28:14 +03:00
JalonSolov
141248f592
doc: vweb README (#10106) 2021-05-15 05:53:25 +03:00
Delyan Angelov
143c3d4bb4
io: deprecate io.make_reader (not needed anymore) 2021-05-13 10:26:26 +03:00
Delyan Angelov
2b420cdf4d
ci: vfmt new vlib/vweb/vweb_app_test.v 2021-05-11 14:01:57 +03:00
Delyan Angelov
6450fda938
ci: fix compiling blog/, *and* comptime_if_is_test.v. Add vweb_app_test.v . 2021-05-11 13:59:08 +03:00
Alexander Medvednikov
72a135c7c5 vweb: update vweb_test_server.v 2021-05-11 09:52:08 +03:00
Alexander Medvednikov
dc034d9b16 vweb: make thread safe; checker: $if T is Interface { 2021-05-11 09:30:18 +03:00
Uwe Krüger
d26ac5692e
all: various fixes for [heap]/auto-heap handling (#10033) 2021-05-07 15:58:48 +03:00
Miccah
8b50a5a171
vweb: fix route matching on / (#10001) 2021-05-05 14:20:40 +03:00
Lukas Neubert
dee733aae4
fmt: reset const field align after multi line exprs (#9916) 2021-04-29 02:17:37 +03:00
Carlos Esquerdo Bernat
f46868133b
vweb: remove calling .to_lower too early while processing url and url params (#9805) 2021-04-28 07:46:36 +03:00
Delyan Angelov
cafe382424
vweb: update references to old .init_once() and .init() methods to .init_server() and .before_request() 2021-04-26 19:38:13 +03:00
Delyan Angelov
bd539b6427
vfmt: fix string interpolation formatting with multiple ',",\' and \" . 2021-04-20 20:26:06 +03:00
Miccah
e2be3ec396
vweb: split and parse Content-Type header correctly (#9756) 2021-04-16 08:46:06 +03:00
William Clavier
b11b744630
vweb: fix the none error for empty TCP connections (#9759) 2021-04-16 08:45:46 +03:00
Alexander Medvednikov
a18f85c8cd vweb: init_once() => init_server(); init() => before_request() 2021-04-15 06:27:24 +03:00
Miccah
5eb67ccd94
http: use Header struct for headers (#9462) 2021-04-09 18:17:33 +02:00
Miccah
67ec33218e
vweb: read the entire request body from buffered reader (#9644) 2021-04-09 10:53:33 +03:00
Miccah
f809d4052f
net.http: change header behavior to keep custom header case (#9602) 2021-04-08 02:12:46 +02:00
Delyan Angelov
b041681c00 tests: bump limits to reduce flakyness on m1 with latest clang 2021-04-05 22:38:55 +03:00
Atakan Yenel
e9c7cd0c9f
vweb: add custom errors (#9519) 2021-03-30 15:30:16 +03:00
Alexander Medvednikov
0c055a1ce9 all: s.contains(s2) instead of in 2021-03-23 11:38:56 +03:00
Alexander Medvednikov
149151b1e8 cgen: minor vfmt 2021-03-17 03:41:52 +03:00
Alexander Medvednikov
091a1bab27 autofree: free global map consts and some vweb fixes 2021-03-17 01:33:35 +01:00
Alexander Medvednikov
852d302b87 io: BufferedReader.free() 2021-03-15 21:25:19 +01:00
Anton Zavodchikov
1ad4623fb8
tmpl: move to v/parser (#9052) 2021-03-15 13:35:55 +02:00
Alexander Medvednikov
530b981765 vweb: mark send_response_to_client with [manualfree] 2021-03-12 01:11:43 +03:00