-
-extern const struct parsers client_patterns[];
-extern const struct parsers server_patterns[];
-extern const struct interceptors intercept_patterns[];
-
-extern void (* const add_client_headers[])(struct client_state *);
-extern void (* const add_server_headers[])(struct client_state *);
-
-extern int flush_socket(int fd, struct client_state *csp);
-extern int add_to_iob(struct client_state *csp, char *buf, int n);
-extern char *get_header(struct client_state *csp);
-
-extern char *sed(const struct parsers pats[], void (* const more_headers[])(struct client_state *), struct client_state *csp);
-
-extern void free_http_request(struct http_request *http);
-extern void parse_http_request(char *req, struct http_request *http, struct client_state *csp);
-
-extern char *crumble(const struct parsers *v, char *s, struct client_state *csp);
-
-extern char *client_referrer(const struct parsers *v, char *s, struct client_state *csp);
-extern char *client_uagent(const struct parsers *v, char *s, struct client_state *csp);
-extern char *client_ua(const struct parsers *v, char *s, struct client_state *csp);
-extern char *client_from(const struct parsers *v, char *s, struct client_state *csp);
-extern char *client_send_cookie(const struct parsers *v, char *s, struct client_state *csp);
-extern char *client_x_forwarded(const struct parsers *v, char *s, struct client_state *csp);
-extern void client_cookie_adder(struct client_state *csp);
-extern void client_xtra_adder(struct client_state *csp);
-extern void client_x_forwarded_adder(struct client_state *csp);
-extern char *server_set_cookie(const struct parsers *v, char *s, struct client_state *csp);
-
-#if defined(PCRS) || defined(KILLPOPUPS)
-extern char *content_type(const struct parsers *v, char *s, struct client_state *csp);
-#endif /* defined(PCRS) || defined(KILLPOPUPS) */
-
-#ifdef PCRS
-extern char *content_length(const struct parsers *v, char *s, struct client_state *csp);
-#endif /* def PCRS */
-
-#ifdef FORCE_LOAD
-char *client_host(const struct parsers *v, char *s, struct client_state *csp);
-int strclean(const char *string, const char *substring);
-#endif /* def FORCE_LOAD */
-
-#if defined(DETECT_MSIE_IMAGES)
-extern char *client_accept(const struct parsers *v, char *s, struct client_state *csp);
-#endif /* defined(DETECT_MSIE_IMAGES) */
-
-/* Revision control strings from this header and associated .c file */
-extern const char parsers_rcs[];
-extern const char parsers_h_rcs[];
-
-#ifdef __cplusplus
-} /* extern "C" */
+extern jb_err header_adjust_content_length(char **header, size_t content_length);
+extern jb_err update_server_headers(struct client_state *csp);
+extern void get_http_time(int time_offset, char *buf, size_t buffer_size);
+extern jb_err get_destination_from_headers(const struct list *headers, struct http_request *http);
+#ifdef FEATURE_HTTPS_INSPECTION
+extern jb_err get_destination_from_https_headers(const struct list *headers, struct http_request *http);