Prechádzať zdrojové kódy

core: define macro for signature to be used for server and user-agent

(cherry picked from commit d26ccdea61230bfc7720a2523c7b6dd8d2692d6d)
(cherry picked from commit 34eafd03b97c857682f9177ec4d7d1f983ff5bf2)
Daniel-Constantin Mierla 5 rokov pred
rodič
commit
82e8f89fe3
1 zmenil súbory, kde vykonal 6 pridanie a 3 odobranie
  1. 6 3
      src/core/config.h

+ 6 - 3
src/core/config.h

@@ -77,12 +77,15 @@
 #define CONTENT_LENGTH "Content-Length: "
 #define CONTENT_LENGTH "Content-Length: "
 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
 
 
-#define USER_AGENT "User-Agent: " NAME \
+#define SRVAPP_SIGNATURE NAME \
 		" (" VERSION " (" ARCH "/" OS_QUOTED "))"
 		" (" VERSION " (" ARCH "/" OS_QUOTED "))"
+#define SRVAPP_SIGNATURE_LEN (sizeof(SRVAPP_SIGNATURE)-1)
+
+
+#define USER_AGENT "User-Agent: " SRVAPP_SIGNATURE
 #define USER_AGENT_LEN (sizeof(USER_AGENT)-1)
 #define USER_AGENT_LEN (sizeof(USER_AGENT)-1)
 
 
-#define SERVER_HDR "Server: " NAME \
-		" (" VERSION " (" ARCH "/" OS_QUOTED "))"
+#define SERVER_HDR "Server: " SRVAPP_SIGNATURE
 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
 
 
 #define MAX_WARNING_LEN  256
 #define MAX_WARNING_LEN  256