Also http-client.h now #includes only http-response.h
http-parser.h \
http-header-parser.h \
http-transfer.h \
+ http-response.h \
http-response-parser.h \
http-client-private.h \
http-client.h
#ifndef HTTP_CLIENT_H
#define HTTP_CLIENT_H
-#include "http-response-parser.h"
+#include "http-response.h"
struct http_response;
#ifndef HTTP_RESPONSE_PARSER_H
#define HTTP_RESPONSE_PARSER_H
-struct http_response_header {
- const char *key;
- const char *value;
- size_t size;
-};
-
-struct http_response {
- unsigned char version_major;
- unsigned char version_minor;
-
- unsigned int status;
-
- const char *reason;
- const char *location;
-
- time_t date;
- struct istream *payload;
-
- ARRAY(struct http_response_header) headers;
-
- unsigned int connection_close:1;
-};
+#include "http-response.h"
struct http_response_parser;
--- /dev/null
+#ifndef HTTP_RESPONSE_H
+#define HTTP_RESPONSE_H
+
+struct http_response_header {
+ const char *key;
+ const char *value;
+ size_t size;
+};
+ARRAY_DEFINE_TYPE(http_response_header, struct http_response_header);
+
+struct http_response {
+ unsigned char version_major;
+ unsigned char version_minor;
+
+ unsigned int status;
+
+ const char *reason;
+ const char *location;
+
+ time_t date;
+ struct istream *payload;
+
+ ARRAY_TYPE(http_response_header) headers;
+
+ unsigned int connection_close:1;
+};
+
+#endif