From 3fdabc783222bf873ddbb9658af6a125acab5def Mon Sep 17 00:00:00 2001 From: Alliballibaba Date: Tue, 21 Jan 2025 00:20:48 +0100 Subject: [PATCH] renames header files. --- cgi.go | 6 +++--- internal/{headers/headers.go => phpheaders/phpheaders.go} | 2 +- .../headers_test.go => phpheaders/phpheaders_test.go} | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) rename internal/{headers/headers.go => phpheaders/phpheaders.go} (99%) rename internal/{headers/headers_test.go => phpheaders/phpheaders_test.go} (95%) diff --git a/cgi.go b/cgi.go index 0d97b9e02..a147c2e7e 100644 --- a/cgi.go +++ b/cgi.go @@ -11,7 +11,7 @@ import ( "strings" "unsafe" - "github.com/dunglas/frankenphp/internal/headers" + "github.com/dunglas/frankenphp/internal/phpheaders" ) var knownServerKeys = []string{ @@ -169,7 +169,7 @@ func addHeadersToServer(request *http.Request, thread *phpThread, fc *FrankenPHP } // if the header name could not be cached, register it inefficiently - k := headers.GetUnCommonHeader(field) + k := phpheaders.GetUnCommonHeader(field) v := strings.Join(val, ", ") C.frankenphp_register_variable_safe(toUnsafeChar(k), toUnsafeChar(v), C.size_t(len(v)), trackVarsArray) } @@ -205,7 +205,7 @@ func getCachedHeaderKey(thread *phpThread, key string) *C.zend_string { } // try to cache cache the header as zend_string - commonKey := headers.GetCommonHeader(key) + commonKey := phpheaders.GetCommonHeader(key) if commonKey == "" { return nil } diff --git a/internal/headers/headers.go b/internal/phpheaders/phpheaders.go similarity index 99% rename from internal/headers/headers.go rename to internal/phpheaders/phpheaders.go index 15dc09f03..536c3b83f 100644 --- a/internal/headers/headers.go +++ b/internal/phpheaders/phpheaders.go @@ -1,4 +1,4 @@ -package headers +package phpheaders import ( "strings" diff --git a/internal/headers/headers_test.go b/internal/phpheaders/phpheaders_test.go similarity index 95% rename from internal/headers/headers_test.go rename to internal/phpheaders/phpheaders_test.go index d9c0fc149..c59e3d656 100644 --- a/internal/headers/headers_test.go +++ b/internal/phpheaders/phpheaders_test.go @@ -1,4 +1,4 @@ -package headers +package phpheaders import ( "testing"