Skip to content

Commit

Permalink
lib-http: Create http-common.h, which contains global definitions sha…
Browse files Browse the repository at this point in the history
…red by client and server.

Currently contains only the default HTTP port definitions that used to be
private to the client.
  • Loading branch information
stephanbosch authored and villesavolainen committed Mar 12, 2018
1 parent c2de719 commit fb954a8
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 6 deletions.
1 change: 1 addition & 0 deletions src/lib-http/Makefile.am
Expand Up @@ -32,6 +32,7 @@ libhttp_la_SOURCES = \
http-server.c

headers = \
http-common.h \
http-date.h \
http-url.h \
http-parser.h \
Expand Down
3 changes: 0 additions & 3 deletions src/lib-http/http-client-private.h
Expand Up @@ -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)
Expand Down
3 changes: 0 additions & 3 deletions src/lib-http/http-client.c
Expand Up @@ -17,9 +17,6 @@

#include "http-client-private.h"

#define HTTP_DEFAULT_PORT 80
#define HTTPS_DEFAULT_PORT 443

/* Structure:
http_client_context:
Expand Down
1 change: 1 addition & 0 deletions src/lib-http/http-client.h
Expand Up @@ -3,6 +3,7 @@

#include "net.h"

#include "http-common.h"
#include "http-response.h"

struct timeval;
Expand Down
7 changes: 7 additions & 0 deletions 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
1 change: 1 addition & 0 deletions 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"

Expand Down

0 comments on commit fb954a8

Please sign in to comment.