From c2f535fee1fae25a83d69852671af7ba5546aa7d Mon Sep 17 00:00:00 2001 From: Alexander Medvednikov Date: Wed, 29 Sep 2021 19:26:43 +0300 Subject: [PATCH] ci: run the gitly web server test --- .github/workflows/ci.yml | 2 ++ vlib/net/http/header.v | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f8e9652ba5..3b9c243ecc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -849,6 +849,8 @@ jobs: ../v . # ./gitly -ci_run ../v -autofree . + ../v -o x tests/first_run.v + ../x cd .. ## vex diff --git a/vlib/net/http/header.v b/vlib/net/http/header.v index 0e8cb00793..6e28dcfe48 100644 --- a/vlib/net/http/header.v +++ b/vlib/net/http/header.v @@ -5,6 +5,16 @@ module http import strings +// Header represents the key-value pairs in an HTTP header +[noinit] +pub struct Header { +mut: + data map[string][]string + // map of lowercase header keys to their original keys + // in order of appearance + keys map[string][]string +} + // CommonHeader is an enum of the most common HTTP headers pub enum CommonHeader { accept @@ -320,16 +330,6 @@ const common_header_map = { 'x-xss-protection': .x_xss_protection } -// Header represents the key-value pairs in an HTTP header -[noinit] -pub struct Header { -mut: - data map[string][]string - // map of lowercase header keys to their original keys - // in order of appearance - keys map[string][]string -} - pub fn (mut h Header) free() { unsafe { h.data.free()