The new HC_F_HTTPPROXY flag allows to use an absolute URI within a
request that won't be modified in order to use an http proxy.
#define HC_F_RES_HDR 0x02
#define HC_F_RES_BODY 0x04
#define HC_F_RES_END 0x08
+#define HC_F_HTTPPROXY 0x10
#endif /* ! _HAPROXY_HTTCLIENT__T_H */
struct htx *htx;
int err_code = 0;
struct ist meth_ist, vsn;
- unsigned int flags = HTX_SL_F_VER_11 | HTX_SL_F_NORMALIZED_URI | HTX_SL_F_HAS_SCHM;
+ unsigned int flags = HTX_SL_F_VER_11 | HTX_SL_F_HAS_SCHM | HTX_SL_F_HAS_AUTHORITY;
int i;
int foundhost = 0, foundaccept = 0, foundua = 0;
+ if (!(hc->flags & HC_F_HTTPPROXY))
+ flags |= HTX_SL_F_NORMALIZED_URI;
+
if (!b_alloc(&hc->req.buf))
goto error;