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

http: fix response headers and status code; clean up ft and gg

This commit is contained in:
Alexander Medvednikov
2019-08-05 10:42:58 +02:00
parent ff730b4eb0
commit 7a7b5040e2
11 changed files with 131 additions and 96 deletions

View File

@@ -5,8 +5,8 @@
module builtin
struct string {
mut:
hash_cache int
//mut:
//hash_cache int
pub:
str byteptr
len int
@@ -864,7 +864,8 @@ pub fn (c byte) is_white() bool {
pub fn (s string) hash() int {
mut h := s.hash_cache
//mut h := s.hash_cache
mut h := 0
if h == 0 && s.len > 0 {
for c in s {
h = h * 31 + int(c)