From: Stephan Bosch Date: Sun, 21 Jan 2018 14:50:37 +0000 (+0100) Subject: lib-http: Create http-common.h, which contains global definitions shared by client... X-Git-Tag: 2.3.1~100 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=fb954a8f573076c3df7a89d28a59e54f7b170770;p=thirdparty%2Fdovecot%2Fcore.git lib-http: Create http-common.h, which contains global definitions shared by client and server. Currently contains only the default HTTP port definitions that used to be private to the client. --- diff --git a/src/lib-http/Makefile.am b/src/lib-http/Makefile.am index 241d562263..2df2bb9c78 100644 --- a/src/lib-http/Makefile.am +++ b/src/lib-http/Makefile.am @@ -32,6 +32,7 @@ libhttp_la_SOURCES = \ http-server.c headers = \ + http-common.h \ http-date.h \ http-url.h \ http-parser.h \ diff --git a/src/lib-http/http-client-private.h b/src/lib-http/http-client-private.h index cd218c0ccc..efb838382f 100644 --- a/src/lib-http/http-client-private.h +++ b/src/lib-http/http-client-private.h @@ -10,9 +10,6 @@ * Defaults */ -#define HTTP_DEFAULT_PORT 80 -#define HTTPS_DEFAULT_PORT 443 - #define HTTP_CLIENT_CONTINUE_TIMEOUT_MSECS (1000*2) #define HTTP_CLIENT_DEFAULT_REQUEST_TIMEOUT_MSECS (1000*60*1) #define HTTP_CLIENT_DEFAULT_DNS_LOOKUP_TIMEOUT_MSECS (1000*10) diff --git a/src/lib-http/http-client.c b/src/lib-http/http-client.c index 0a028c14df..1c4f89ad4e 100644 --- a/src/lib-http/http-client.c +++ b/src/lib-http/http-client.c @@ -17,9 +17,6 @@ #include "http-client-private.h" -#define HTTP_DEFAULT_PORT 80 -#define HTTPS_DEFAULT_PORT 443 - /* Structure: http_client_context: diff --git a/src/lib-http/http-client.h b/src/lib-http/http-client.h index 26fd0a9057..7c530f5049 100644 --- a/src/lib-http/http-client.h +++ b/src/lib-http/http-client.h @@ -3,6 +3,7 @@ #include "net.h" +#include "http-common.h" #include "http-response.h" struct timeval; diff --git a/src/lib-http/http-common.h b/src/lib-http/http-common.h new file mode 100644 index 0000000000..9aa217fc85 --- /dev/null +++ b/src/lib-http/http-common.h @@ -0,0 +1,7 @@ +#ifndef HTTP_COMMON_H +#define HTTP_COMMON_H + +#define HTTP_DEFAULT_PORT 80 +#define HTTPS_DEFAULT_PORT 443 + +#endif diff --git a/src/lib-http/http-server.h b/src/lib-http/http-server.h index eadc799f0f..6a94b38f8e 100644 --- a/src/lib-http/http-server.h +++ b/src/lib-http/http-server.h @@ -1,6 +1,7 @@ #ifndef HTTP_SERVER_H #define HTTP_SERVER_H +#include "http-common.h" #include "http-auth.h" #include "http-request.h"