add option `--crlf` to gnutls-serv to disable replacing a received CRLF
by LF in echo mode (fixes #1073).
Signed-off-by: Albrecht Dreß <albrecht.dress@arcor.de>
doc = "";
};
+flag = {
+ name = crlf;
+ descrip = "Do not replace CRLF by LF in Echo server mode";
+ doc = "";
+};
+
flag = {
name = udp;
value = u;
/* global stuff */
static int generate = 0;
static int http = 0;
+static int strip_crlf = 1;
static int x509ctype;
static int debug = 0;
*response = peer_print_data(session, response_length);
} else {
int ret;
- strip(request);
+ if (strip_crlf != 0)
+ strip(request);
fprintf(stderr, "received cmd: %s\n", request);
ret = check_command(session, request, disable_client_cert);
noticket = HAVE_OPT(NOTICKET);
earlydata = HAVE_OPT(EARLYDATA);
- if (HAVE_OPT(ECHO))
+ if (HAVE_OPT(ECHO)) {
http = 0;
- else
+ if (HAVE_OPT(CRLF))
+ strip_crlf = 0;
+ } else
http = 1;
record_max_size = OPT_VALUE_RECORDSIZE;