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

55 Commits

Author SHA1 Message Date
Nick Treleaven
bab5c21224
parser: warn when fixed-size ArrayInit doesn't have trailing {}. (#6137) 2020-08-16 04:54:05 +02:00
Delyan Angelov
5813d2bf72 net.socket: add s.peer_ip() 2020-07-02 23:02:56 +03:00
Nick Treleaven
e7339fec15
all: disallow pointer arithmetic for AssignStmt, PostfixExpr outside unsafe{} (#5581) 2020-07-01 14:50:17 +02:00
Delyan Angelov
0d6233cd45 net: support for s.max_single_send_size in Socket.send/2 2020-06-21 17:40:39 +03:00
Enzo Baldisserri
11b7b97311
parser: fail when assigning to _ with := 2020-06-08 00:47:04 +02:00
Naheel
4fcabb71c4
os: implement cp for nix 2020-06-01 21:11:40 +02:00
Delyan Angelov
06540f0e91 net: fix warnings due to uppercase consts 2020-05-24 07:39:47 +03:00
yuyi
dda875a9c8
all: unify const names to snake_case 2020-05-22 17:36:09 +02:00
Uwe Krüger
2635be511f
all: re-apply C++ support 2020-05-18 21:38:06 +02:00
Alexander Medvednikov
07a78b2843 Revert "all: C++ compiler support"
This reverts commit 9a237c3e82.
2020-05-18 17:05:48 +02:00
Uwe Krüger
9a237c3e82
all: C++ compiler support 2020-05-18 15:51:36 +02:00
Enzo Baldisserri
f44a40eee0
checker: check incorrect names 2020-05-16 16:12:23 +02:00
Alexey
d078e6bb08
net: check if socket descriptor is valid 2020-04-11 19:06:01 +02:00
Delyan Angelov
217e6f3b8e checker/parser: allow for fixed array with sizes defined with a const 2020-04-10 22:01:22 +03:00
Alexander Medvednikov
fa6aaad6df checker: handle x := x 2020-04-08 19:15:19 +02:00
spaceface777
ef8c1203b4
cleanup: replace C for loops with range 2020-02-24 17:55:16 +01:00
Delyan Angelov
0ad5d53423
net.http: more robust handling of relative /path URL redirects 2020-02-12 14:52:39 +01:00
Alexander Medvednikov
848cd3cb3e run vfmt on http, net, sync, strconv 2019-12-22 01:57:50 +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
ad6adf327e vlib: fix missing else{} in match statements 2019-12-07 17:23:37 +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
40df0644ca fix all Foo{!} 2019-12-04 13:08:28 +03:00
Alexander Medvednikov
a3b14e00a2 vweb fixes 2019-11-26 16:08:16 +03:00
Alexander Medvednikov
feacc2441f socket: fix sizeof 2019-11-25 06:23:09 +03:00
Alexander Medvednikov
e9e931fe4a force C function definitions 2019-11-24 12:14:22 +03:00
Delyan Angelov
c73f34cc5f net: make net.socket.write, net.socket.read_line more robust 2019-11-19 00:13:14 +03:00
Delyan Angelov
32473eeafe net and http: more consistent error messages 2019-11-12 19:23:53 +03:00
Alexander Medvednikov
892d1c6aab vweb: first step to revive it 2019-10-24 22:46:58 +03:00
vitalyster
a5ccc4673b http: handle and print socket errors 2019-10-10 20:24:36 +03:00
vitalyster
f86a52aae6 socket: reuse socket parameters in addrinfo hints 2019-10-10 20:09:43 +03:00
vitalyster
0796e1dd69 socket: no need to initialize WinSock on each request 2019-10-09 21:01:31 +03:00
vitalyster
9834ccfcd9 windows: Unicode and IPv6 http/sockets
cleanup schannel implementation (drop NT4.0 compatibility, use unicode strings, etc)
restore http tests
fix socket test: it did not throw before
2019-09-26 22:54:15 +03:00
Alexander Medvednikov
d2d75f3824 parser: do not allow "int?", only "?int" 2019-09-23 23:17:06 +03:00
Delyan Angelov
0e39df24d4 net: make socket.recv return the allocated buffer and the message length 2019-09-23 19:48:18 +03:00
vitalyster
a42b4e219c net.socket: windows fixes and test
* added missing ai_canonname in addrinfo structure
* ai_canonname, ai_addr and ai_addrlen must be zeroed before getaddrinfo call
* write() must not be used on windows sockets
* added (Socket).get_port() function which is useful when socket was initialized with 0 (random) port
* tests is fixed, test server started listening on random port to avoid conflicts
2019-09-20 17:04:39 +03:00
Delyan Angelov
db110759ab vweb: fix warnings 2019-09-03 19:10:56 +03:00
Alexander Medvednikov
f61b14584a remove "import const" everywhere 2019-08-23 00:09:03 +03:00
Delyan Angelov
ffb6c6f5b4 net: add udp socket support and a simple udp server example. 2019-08-22 04:01:04 +03:00
Delyan Angelov
51818346df http: support plain http protocol 2019-08-21 20:04:06 +03:00
Carlos Esquerdo Bernat
cf23c289ec tests: cleanup 2019-08-20 11:18:12 +03:00
kambrium
a5af903362 Fixed typo 2019-08-16 09:02:09 +03:00
Vitaly Takmazov
43b81688f6 socket: WSACleanup should not be called on socket close 2019-08-06 01:50:45 +02:00
Nicolas Sauzede
f306fbb2f0 net connect: fix error/return type 2019-08-04 01:46:55 +02:00
Alexander Medvednikov
207bab5f79 generics, vweb, comptime codegen, etc 2019-07-29 18:24:48 +02:00
Justice Suh
d72c859bf9 net: socket error handling 2019-07-24 00:31:39 +02:00
Alexander Medvednikov
390394b56b string: make substr() copy the data, like in Java and C#; remove .cstr()
this makes managing memory used by strings much easier
V strings are now fully compatible with C strings
2019-07-22 17:03:45 +02:00
Justice Suh
5dfd5fa3e7 net: add windows socket support 2019-07-14 00:04:45 +02:00
archanpatkar
5e0ae9a429 net: added listen_backlog to enable custom backlog 2019-07-03 16:13:02 +02:00
S-YOU
53e439bc99 setsockopt arg optvalue supposed to be ptr 2019-07-02 21:49:05 +02:00