]> granicus.if.org Git - apache/blobdiff - modules/proxy/mod_proxy.h
Close PR 32459, 15207. API change for PROXY_DECLARE ap_proxy_canonenc()
[apache] / modules / proxy / mod_proxy.h
index c84c48bee14ba4f339c626c78e714ddfdc02e045..8e56b23cc674a63f1c88dfdd0b3daac1e3c04407 100644 (file)
@@ -242,8 +242,8 @@ typedef struct {
     int             retries;    /* number of retries on this worker */
     int             lbstatus;   /* Current lbstatus */
     int             lbfactor;   /* dynamic lbfactor */
-    apr_off_t       transfered; /* Number of bytes transfered to remote */
-    apr_off_t       readed;     /* Number of bytes readed from remote */
+    apr_off_t       transferred;/* Number of bytes transferred to remote */
+    apr_off_t       read;       /* Number of bytes read from remote */
     apr_size_t      elected;    /* Number of times the worker was elected */
     char            route[PROXY_WORKER_MAX_ROUTE_SIZ+1];
     char            redirect[PROXY_WORKER_MAX_ROUTE_SIZ+1];
@@ -292,6 +292,10 @@ struct proxy_balancer {
     apr_interval_time_t timeout; /* Timeout for waiting on free connection */
     int                 max_attempts; /* Number of attempts before failing */
     char                max_attempts_set;
+    enum {
+       lbmethod_requests = 1,
+       lbmethod_traffic = 2
+    } lbmethod;
 
     /* XXX: Perhaps we will need the proc mutex too.
      * Altrough we are only using arithmetic operations
@@ -377,7 +381,7 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r);
 PROXY_DECLARE(int) ap_proxy_hex2c(const char *x);
 PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x);
 PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t,
-                                       int isenc);
+                                       int forcedec, int proxyreq);
 PROXY_DECLARE(char *)ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp,
                                            char **passwordp, char **hostp, apr_port_t *port);
 PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x);
@@ -399,6 +403,27 @@ PROXY_DECLARE(int) ap_proxy_connect_to_backend(apr_socket_t **, const char *, ap
 PROXY_DECLARE(int) ap_proxy_ssl_enable(conn_rec *c);
 PROXY_DECLARE(int) ap_proxy_ssl_disable(conn_rec *c);
 
+/* Header mapping functions, and a typedef of their signature */
+PROXY_DECLARE(const char *) ap_proxy_location_reverse_map(request_rec *r, proxy_server_conf *conf, const char *url);
+PROXY_DECLARE(const char *) ap_proxy_cookie_reverse_map(request_rec *r, proxy_server_conf *conf, const char *str);
+
+#if !defined(WIN32)
+typedef const char *(*ap_proxy_header_reverse_map_fn)(request_rec *,
+                       proxy_server_conf *, const char *);
+#elif defined(PROXY_DECLARE_STATIC)
+typedef const char *(__stdcall *ap_proxy_header_reverse_map_fn)(request_rec *,
+                                 proxy_server_conf *, const char *);
+#elif defined(PROXY_DECLARE_EXPORT)
+typedef __declspec(dllexport) const char *
+  (__stdcall *ap_proxy_header_reverse_map_fn)(request_rec *,
+               proxy_server_conf *, const char *);
+#else
+typedef __declspec(dllimport) const char *
+  (__stdcall *ap_proxy_header_reverse_map_fn)(request_rec *,
+               proxy_server_conf *, const char *);
+#endif
+
+
 /* Connection pool API */
 /**
  * Get the worker from proxy configuration