diff options
Diffstat (limited to 'accel-pppd/ctrl/sstp/sstp.c')
-rw-r--r-- | accel-pppd/ctrl/sstp/sstp.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/accel-pppd/ctrl/sstp/sstp.c b/accel-pppd/ctrl/sstp/sstp.c index 0206b69d..c7cbfea2 100644 --- a/accel-pppd/ctrl/sstp/sstp.c +++ b/accel-pppd/ctrl/sstp/sstp.c @@ -810,12 +810,10 @@ static char *http_getvalue(char *line, const char *name, int len) static int http_send_response(struct sstp_conn_t *conn, char *proto, char *status, char *headers) { char datetime[sizeof("aaa, dd bbb yyyy HH:MM:SS GMT")]; - struct buffer_t *buf; + char linebuf[1024], *line; + struct buffer_t *buf, tmp; time_t now = time(NULL); - if (conf_verbose) - log_ppp_info2("send [HTTP <%s %s>]\n", proto, status); - strftime(datetime, sizeof(datetime), "%a, %d %b %Y %H:%M:%S GMT", gmtime(&now)); buf = alloc_buf_printf( "%s %s\r\n" @@ -828,6 +826,15 @@ static int http_send_response(struct sstp_conn_t *conn, char *proto, char *statu return -1; } + if (conf_verbose) { + tmp = *buf; + while ((line = http_getline(&tmp, linebuf, sizeof(linebuf))) != NULL) { + if (*line == '\0') + break; + log_ppp_info2("send [HTTP <%s>]\n", line); + } + } + return sstp_send(conn, buf); } |