Sandro Martini
07b5d6b1b6
vweb: add mime type for json static content ( #6347 )
2020-09-11 23:14:44 +03:00
Alexander Medvednikov
ea31f75098
checker: more default field fixes
2020-09-09 14:14:44 +02:00
Sandro Martini
39da5eca89
vweb: hide debug prints
2020-08-31 19:39:46 +02:00
florin
b1a8e1e5b2
vweb: escape form key, not only value. ( #6269 )
2020-08-30 19:09:12 +02:00
Maciej Obarski
7bd2804ce9
all: automatic error propagation in place of "or { return(err) }"
2020-08-29 01:58:03 +02:00
spaceface777
eff319f869
comp_for: allow checking full mehod and arg types ( #5997 )
2020-08-27 15:00:44 +02:00
Delyan Angelov
f259d275fc
tests: bump simple_tcp_client retries to 20
2020-08-25 17:52:44 +03:00
Delyan Angelov
7b7ab580ab
tests: add retry logic in simple_tcp_client in vweb_test.v
2020-08-25 17:05:40 +03:00
Delyan Angelov
2ad2b4c5ba
vweb: add more tests. Fix missing Content-Length: header bug on 404.
2020-08-14 02:49:15 +03:00
Delyan Angelov
712f4bd7f8
vweb: add tests
2020-08-14 00:52:02 +03:00
Delyan Angelov
a62307f711
vweb: fix body appending (missing closing json bracket)
2020-08-13 21:07:31 +03:00
spaceface777
2353814821
vweb: fix body size calculation ( #6122 )
2020-08-13 20:55:33 +03:00
Delyan Angelov
36eae1c175
builtin: x.vstring() instead of string(x) ( #6102 )
2020-08-10 18:05:26 +02:00
Sandro Martini
c7fae4dd6f
vweb: add set_status() ( #6087 )
2020-08-09 18:05:06 +02:00
Louis Schmieder
1fd499ed4a
vweb: fix request checking ( #6027 )
2020-07-31 01:26:56 +02:00
joe-conigliaro
395e886b2e
http/vweb: use Method enum & add helpers
2020-07-28 14:13:19 +10:00
Louis Schmieder
b58b15993c
gen: compile time for (methods and fields) ( #5957 )
2020-07-25 00:02:44 +02:00
Louis Schmieder
b537d8e23e
parser: comp `for` attrs array ( #5903 )
2020-07-23 17:19:37 +02:00
Louis Schmieder
bb60fe2ccf
vweb: implement cookie expiration date ( #5873 )
2020-07-19 21:42:50 +02:00
Alexander Medvednikov
69ef43ba00
vweb: fix ip()
2020-07-16 21:23:35 +02:00
Alexander Medvednikov
6245876806
vweb: ip()
2020-07-16 00:48:14 +02:00
Delyan Angelov
ca9790a71f
vweb: ensure the tcp connection is always closed at the end of the response
2020-07-10 10:49:39 +03:00
Louis Schmieder
3792e17885
vweb: fix routing for 0 params ( #5773 )
2020-07-09 17:16:02 +02:00
Louis Schmieder
373aa3dbc8
vweb: router: fix trailing / ( #5760 )
2020-07-08 22:15:37 +02:00
Alexander Medvednikov
03b76d19f1
repl: make the info message a bit smaller
2020-07-08 17:22:38 +02:00
Louis Schmieder
7ad03e9d6a
vweb: simplify router ( #5751 )
2020-07-08 15:22:03 +02:00
Alexander Medvednikov
246e7e8464
vweb: form error
2020-07-07 21:35:59 +02:00
Louis Schmieder
d2d4ea42ce
vweb: add url query ( #5719 )
2020-07-07 13:46:57 +02:00
Alexander Medvednikov
a6450e8e98
vweb: fix and simplify routing
2020-07-07 12:35:45 +02:00
Louis Schmieder
3cd9e2cab7
vweb: fix index ( #5682 )
2020-07-05 22:05:58 +02:00
Alexander Medvednikov
36183660e6
remove oldgg, gl, glfw, freetype from vlib now that we have the new sokol based `gg`
2020-07-05 16:44:28 +02:00
Alexander Medvednikov
244d61f8d0
vweb: fix a route matching bug
2020-07-03 22:00:17 +02:00
Alexander Medvednikov
2281163efd
vweb: fix a routing bug
2020-07-03 17:50:48 +02:00
Tom Leen
51410fdb6d
vweb: add .txt and .md mime types ( #5641 )
2020-07-03 17:17:25 +02:00
Alexander Medvednikov
b7175b54eb
vweb: ['/:arg1/:arg2/action'] attribute
2020-07-03 15:10:39 +02:00
Delyan Angelov
4e34edfa81
vweb: allow quoting @css/@js resources with both ' and "
2020-07-01 22:03:30 +03:00
Delyan Angelov
d43722fa85
vweb: fix compiling templates containing '
2020-07-01 17:44:26 +03:00
Alexander Medvednikov
34ddc9240e
tutorials: web blog fixes
2020-06-30 21:04:00 +02:00
Louis Schmieder
616b07204d
vweb: add cookies with expire date
2020-06-29 21:14:36 +02:00
Alexander Medvednikov
3f59f23427
vweb: fix a leak
2020-06-28 19:55:53 +02:00
Alexander Medvednikov
0138f46797
vweb: fix a leak
2020-06-28 13:56:38 +02:00
Alexander Medvednikov
e666209fe2
vweb: set_content_type()
2020-06-27 23:22:41 +02:00
Alexander Medvednikov
02b846aa72
vweb: fix json() and text() results
2020-06-27 13:56:15 +02:00
Daniel Däschle
8903f6e0c0
tmpl: add docs for variables
2020-06-26 15:02:49 +02:00
Alexander Medvednikov
bb5793d485
vweb: more xss fixes
2020-06-24 22:38:25 +02:00
Alexander Medvednikov
83b300435a
vweb: escape html; table: rename parent_typ to parent_type
2020-06-24 22:12:33 +02:00
Alexander Medvednikov
11ad18cd28
vweb: page gen time
2020-06-23 21:02:20 +02:00
Alexander Medvednikov
74af88bc92
Revert "fmt: re-format parser.v and cgen.v"
...
This reverts commit 6b2808a3f9
.
2020-06-23 18:16:24 +02:00
Alexander Medvednikov
6b2808a3f9
fmt: re-format parser.v and cgen.v
2020-06-23 18:05:53 +02:00
Alexander Medvednikov
a4b159a80f
orm: order by id by default
2020-06-22 17:13:57 +02:00
Alexander Medvednikov
deb09d95b0
orm: fix `column == var`; limit 1; vweb: @footer
2020-06-22 16:52:16 +02:00
Daniel Däschle
76dc7eea50
vweb: tmpl: add docs
2020-06-20 13:29:55 +02:00
Alexander Medvednikov
1d8d19c977
vweb: return $vweb.html()
2020-06-20 03:12:38 +02:00
JalonSolov
bbd6d0b4e5
vweb: ignore url params on static files
2020-06-20 01:39:55 +02:00
Alexander Medvednikov
6ce7bb4581
vweb: remove an unnecessary empty newline at the start
2020-06-13 16:59:06 +02:00
Alexander Medvednikov
b13c95ea48
Revert "vweb: @include tempaltes"
...
This reverts commit 6b06184ef4
.
2020-06-12 14:32:09 +02:00
Daniel Däschle
6b06184ef4
vweb: @include tempaltes
2020-06-12 14:30:07 +02:00
Alexander Medvednikov
c9cfe9d40b
vweb: @js and @css template fns
2020-06-11 20:34:59 +02:00
Alexander Medvednikov
72fdb09e46
time: relative_short(); fmt: handle $vweb.html()
2020-06-11 20:26:49 +02:00
Alexander Medvednikov
8f3f27f286
vweb: bring back @header
2020-06-11 11:13:41 +02:00
Daniel Däschle
123d788d0d
vweb: include directive
2020-06-10 18:53:04 +02:00
Alexander Medvednikov
a2d7bc6e6f
vweb: look for html templates in `templates/`
2020-06-10 18:00:11 +02:00
Alexander Medvednikov
a130d3cd14
vweb: fix unused var warning
2020-06-10 12:17:49 +02:00
Alexander Medvednikov
b904d7d1ba
vweb: debug prints behind $if debug
2020-06-10 11:50:06 +02:00
Alexander Medvednikov
2ed4457c5f
vweb: init_once()
2020-06-10 11:24:36 +02:00
Alexander Medvednikov
4a7ec90bef
vweb: fix a bug with <span>
2020-06-10 01:43:04 +02:00
Alexander Medvednikov
e5aba94ae4
vweb: use state enum
2020-06-09 23:20:51 +02:00
joe-conigliaro
3664bea912
vweb/checker: show tmpl var errors
2020-06-10 02:47:51 +10:00
Alexander Medvednikov
b3e416fb52
vweb: fix duplicate fn error with multiple templates
2020-06-09 12:43:20 +02:00
Alexander Medvednikov
1bbfc271c5
vweb: fix unused tmpl warning; remove duplicate code
2020-06-08 13:30:42 +02:00
Alexander Medvednikov
288a6ee468
vweb: minor tmpl fixes
2020-06-08 12:44:38 +02:00
Alexander Medvednikov
30ade1d6ea
tests: test more vweb template features
2020-06-07 19:06:07 +02:00
joe-conigliaro
1c2bf7b244
vweb: impl of comptime tmpl parsing (fix vweb_example)
2020-06-07 20:26:45 +10:00
Delyan Angelov
013bfc7ebc
vweb: add vweb.run_app(app,port); fix compilation of vweb_assets/main.v
2020-06-07 11:02:35 +03:00
Alexander Medvednikov
4d5ac1e16d
vweb: $html
2020-06-06 21:36:34 +02:00
Alexander Medvednikov
7815c5b108
cgen: $action (ComptimeCall); vweb: hello world works!
2020-06-06 10:05:26 +02:00
Alexander Medvednikov
11908410f3
vweb: make compile
2020-06-05 21:04:18 +02:00
Alexander Medvednikov
e3917d98c2
generics: another mut arg test
2020-06-05 20:57:05 +02:00
Daniel Däschle
6118875ee3
vweb: add tmpl api to compile either file or a string
2020-06-04 22:30:25 +02:00
Alexander Medvednikov
3d83934caf
checker: check mutating methods; generics fixes
2020-06-01 15:44:10 +02:00
Alexander Medvednikov
81b44dc2c9
generics: generic call inside generic call; checker: check mut args at call
2020-05-29 04:30:00 +02:00
Alexander Medvednikov
59711d9c55
generics: test `T{}`
2020-05-27 06:53:52 +02:00
Alexander Medvednikov
fc67046bac
checker: fix pub fn check
2020-05-27 03:38:21 +02:00
Alexander Medvednikov
7c9279c447
vfmt: make work with comptime
2020-05-27 03:33:40 +02:00
Uwe Krüger
fd4d28b7b6
tests: update for stricter type checks
2020-05-24 21:07:32 +02:00
yuyi
dda875a9c8
all: unify const names to snake_case
2020-05-22 17:36:09 +02:00
Delyan Angelov
ac396ea02f
http: cleanup backend_nix.c.v, fixes vpm too
2020-05-20 12:04:28 +03:00
iRedMail
4a70d2fe51
examples: fix 2 unused var warnings
2020-05-17 14:15:04 +02:00
yuyi
7f4cf08516
parser: check `(mut f Foo)` syntax
2020-05-17 13:51:18 +02:00
yuyi
9f4d498ff1
all: update`import ()` and `[]array`
2020-04-26 13:49:31 +02:00
yuyi
541b058e90
all: use `a !in b` instead of `!(a in b)`
2020-04-26 06:39:23 +02:00
yuyi
9c5de77f12
os: ext => file_ext
2020-03-26 14:18:08 +01:00
Ian M. Jones
93920a4bb0
vweb: set request data with body text to allow use in actions
2020-03-16 14:30:55 +01:00
Ian M. Jones
0e68ca120e
vweb.assets: fix am is declared as mutable, but it was never changed message
2020-03-13 04:32:24 +01:00
Ian M. Jones
c731615dbb
vweb: cater for trailing slashes being used in handle_static call
2020-03-08 15:41:59 +01:00
yuyi
783dee1f48
os: merge with filepath
2020-03-07 22:26:26 +01:00
Ian M. Jones
750f37fde7
vweb: fix serving static files
2020-03-07 14:16:03 +01:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range
2020-02-24 17:55:16 +01:00
Major Taylor
e9827f5a34
vweb: fix typo in 'assets.v'
2020-02-07 23:12:30 +01:00
Alexander Medvednikov
6c3613407d
vweb: fix header.html
2020-02-06 10:41:10 +01:00
joe-conigliaro
7f709c3285
update copyright years
2020-02-03 05:00:36 +01:00
Shun Sakai
c8c43a2475
update copyright year
2020-01-23 21:04:46 +01:00
Delyan Angelov
c24a1b3786
compiler: fix unused import warnings
2020-01-05 16:29:33 +01:00
Abdullah Atta
63b70ddb06
move http module to net.http
2019-12-30 05:42:23 +01:00
Charles WANG
b1013697d1
vlib/vweb.v: add public const and functions
2019-12-23 13:24:53 +03:00
Alexander Medvednikov
61bfecfa09
vweb: minor fixes
2019-12-21 05:19:26 +03:00
Alexander Medvednikov
6210984c97
run vfmt
2019-12-20 02:09:56 +03:00
Alexander Medvednikov
45695543ba
tutorial: minor fixes
2019-12-14 18:59:02 +03:00
Alexander Medvednikov
797d4364e7
vweb: fix reading request's body/headers
2019-12-13 23:46:11 +03:00
Alexander Medvednikov
fb3da327d6
vweb: fix a cookie bug
2019-12-13 21:11:40 +03:00
taojy123
28f76f10db
vweb: fix empty post request blocking
2019-12-11 19:20:46 +03:00
Delyan Angelov
13769f440f
vweb: continue after bad http client connection; performance fixes
...
* Enable compiling vweb with -prod (by supressing 'declared and not used' warning about 'reset') .
* Fix http responses (now wrk is happy and shows no errors) by adding a Content-Length header.
* Fix -g compilation for urllib.v .
* vweb: println action= only in debug mode.
* vweb: max request headers counting fix.
* Make vweb.html get a 'ctx mut Context' param, just like the other methods.
* vweb: simplify add_header.
* Use a string builder for the most common html case so that the response http text can be send in one go.
* vweb: reduce _STR/string interpolation usage in the most common html response case.
* vweb: refactor common http response formatting into Context.send_response_to_client/2 method.
2019-12-11 17:32:54 +03:00
Alexander Medvednikov
f286387647
vweb: secure HttpOnly cookies
2019-12-11 03:20:30 +03:00
Alexander Medvednikov
cdfbb2978d
strings: replace_each([]); orm: update
2019-12-10 23:57:49 +03:00
Alexander Medvednikov
0650d58818
vweb: readme: list some features of vweb
2019-12-10 00:16:39 +03:00
Alexander Medvednikov
51051cdf92
vweb: enable @ logic in the header + fix the example
2019-12-09 23:34:38 +03:00
Alexander Medvednikov
6f49d4c1d2
orm: bool support; vweb fixes
2019-12-09 23:20:29 +03:00
Alexander Medvednikov
d58982a6f6
vweb: fix tests
2019-12-08 18:07:04 +03:00
Alexander Medvednikov
1c6f7180b2
vweb: fix form parsing
2019-12-08 17:37:23 +03:00
Alexander Medvednikov
7adda3b71a
vweb: fix get_cookie()
2019-12-08 01:48:49 +03:00
Alexander Medvednikov
b1174428a5
vweb: fix redirect()
2019-12-08 01:05:57 +03:00
Alexander Medvednikov
329485d4b6
vweb: fix headers and cookies
2019-12-07 15:04:05 +03:00
Alexander Medvednikov
c8d111924d
check unused and unmodified vars in all modules, not just main
2019-12-06 18:43:56 +03:00
Alexander Medvednikov
a57e29dfc5
os: replace dir_exists with is_dir; file_exists() => exists()
2019-12-04 23:17:45 +03:00
Delyan Angelov
ec15bfb7d1
v test v => v test-compiler
2019-12-01 12:50:13 +03:00
Alexander Medvednikov
81d4f66fbb
string: make `index()` return `?int` instead of `int`/-1
2019-11-30 13:21:21 +03:00
Alexander Medvednikov
a3b14e00a2
vweb fixes
2019-11-26 16:08:16 +03:00
joe-conigliaro
3107618732
vweb: remove no longer needed special case & fix tmpl
2019-11-26 09:23:11 +03:00
joe-conigliaro
7158a012c3
compiler: update to get vweb working
2019-11-25 13:48:25 +03:00
Don Alfons Nisnoni
3a6ccf7f31
os: mkdir() error handling
2019-11-23 19:55:18 +03:00
joe-conigliaro
ab91733a28
small optimization with generics and use os.is_dir in vweb again
2019-11-22 10:55:20 +03:00
joe-conigliaro
8fbfceed30
compiler: generics - support across modules/files
2019-11-22 08:22:11 +03:00
Michiel Vlootman
328ccebf06
readme: fix link to vweb example
2019-11-16 19:58:55 +03:00
joe-conigliaro
59378dce46
compiler/vlib: replace substr/left/right with `[start..end]` everywhere
2019-10-27 10:03:15 +03:00
Alexander Medvednikov
892d1c6aab
vweb: first step to revive it
2019-10-24 22:46:58 +03:00
Delyan Angelov
eef73eea22
tools: new tool to extracts function names declared in V files
2019-10-21 14:14:28 +03:00
Simon Ernst
270934441c
os: make ls() return an optional
2019-10-17 14:30:05 +03:00
joe-conigliaro
d4bae356ba
compiler/vlib: add error for no new vars in loop ("_,_") & remove "." from errors
2019-09-25 17:59:50 +03:00
joe-conigliaro
8974aa4513
compiler/vlib: change `_ :=` to `_ =` and disable `_ :=`
2019-09-25 15:10:45 +03:00
joe-conigliaro
23c84516e2
compiler: error on unused imports
2019-09-23 13:42:20 +03:00
Vitor Oliveira
1a099c9284
vlib: fix several typos
2019-09-14 23:54:14 +03:00
Flavien CADET
c1f76aec3a
vweb: fix a typo
2019-09-06 20:30:20 +03:00
Carlos Esquerdo Bernat
8a77d4482c
vweb: fix headers
2019-09-05 15:46:24 +03:00
kawa-yoiko
4f0f99e663
parser: fix mutability with chained fields
2019-08-30 20:19:06 +03:00
Carlos Esquerdo Bernat
cf23c289ec
tests: cleanup
2019-08-20 11:18:12 +03:00
unknown-v
49205dcce3
examples: fix maps warnings
2019-08-17 02:55:11 +03:00
Alexander Medvednikov
c156cef972
vweb: fix the test
2019-08-16 09:58:27 +03:00
Alexander Medvednikov
dc9cebe26c
orm fixes; glfw: remove C code
2019-08-16 09:10:03 +03:00
Alexander Medvednikov
a11961b0d3
vweb: make mime_types a const
2019-08-13 01:04:26 +03:00
Alexander Medvednikov
ef2ab31e88
sql: only accept strings and ints for now
2019-08-12 21:07:03 +03:00