Commit def2679a authored by David Woodhouse's avatar David Woodhouse

Make --dump-http-traffic dump the CONNECT request too

Signed-off-by: default avatarDavid Woodhouse <David.Woodhouse@intel.com>
parent 58a2bfe8
......@@ -243,6 +243,10 @@ static int start_cstp_connection(struct openconnect_info *vpninfo)
_("Error creating HTTPS CONNECT request\n"));
return buf_free(reqbuf);
}
if (vpninfo->dump_http_traffic)
dump_buf(vpninfo, '>', reqbuf->data);
vpninfo->ssl_write(vpninfo, reqbuf->data, reqbuf->pos);
buf_free(reqbuf);
......
......@@ -1021,7 +1021,7 @@ static int handle_redirect(struct openconnect_info *vpninfo)
}
}
static void dump_buf(struct openconnect_info *vpninfo, char prefix, char *buf)
void dump_buf(struct openconnect_info *vpninfo, char prefix, char *buf)
{
while (*buf) {
char *eol = buf;
......
......@@ -762,6 +762,7 @@ int xmlpost_initial_req(struct openconnect_info *vpninfo,
/* http.c */
struct oc_text_buf *buf_alloc(void);
void dump_buf(struct openconnect_info *vpninfo, char prefix, char *buf);
int buf_ensure_space(struct oc_text_buf *buf, int len);
void __attribute__ ((format (printf, 2, 3)))
buf_append(struct oc_text_buf *buf, const char *fmt, ...);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment