(h http.Header)
| 819 | } |
| 820 | |
| 821 | func nextHeader(h http.Header) func(*lua.LState) int { |
| 822 | keys := make([]string, 0, len(h)) |
| 823 | for k := range h { |
| 824 | keys = append(keys, k) |
| 825 | } |
| 826 | return func(s *lua.LState) int { |
| 827 | if len(keys) > 0 { |
| 828 | k := keys[0] |
| 829 | s.Push(lua.LString(k)) |
| 830 | s.Push(lua.LString(h.Get(k))) |
| 831 | keys[0] = "" // mind peace |
| 832 | keys = keys[1:] |
| 833 | return 2 |
| 834 | } |
| 835 | return 0 |
| 836 | } |
| 837 | } |
| 838 | |
| 839 | func getRequestURLQuery(f filters.FilterContext) func(*lua.LState) int { |
| 840 | return func(s *lua.LState) int { |
no test coverage detected
searching dependent graphs…