core: define macro for signature to be used for server and user-agent
authorDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 16 May 2020 13:20:45 +0000 (15:20 +0200)
committerDaniel-Constantin Mierla <miconda@gmail.com>
Sat, 16 May 2020 13:20:45 +0000 (15:20 +0200)
src/core/config.h

index 63ff8dc..e35fd6d 100644 (file)
 #define CONTENT_LENGTH "Content-Length: "
 #define CONTENT_LENGTH_LEN (sizeof(CONTENT_LENGTH)-1)
 
-#define USER_AGENT "User-Agent: " NAME \
+#define SRVAPP_SIGNATURE NAME \
                " (" 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 SERVER_HDR "Server: " NAME \
-               " (" VERSION " (" ARCH "/" OS_QUOTED "))"
+#define SERVER_HDR "Server: " SRVAPP_SIGNATURE
 #define SERVER_HDR_LEN (sizeof(SERVER_HDR)-1)
 
 #define MAX_WARNING_LEN  256