From: Fabian Keil Date: Wed, 20 Jan 2021 11:32:14 +0000 (+0100) Subject: tests/server: Bump MAX_TAG_LEN to 200 X-Git-Tag: curl-7_76_0~197 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=461e3ef680deefacf874f645d9140a96efc9c5a5;p=thirdparty%2Fcurl.git tests/server: Bump MAX_TAG_LEN to 200 This is useful for tests containing HTML inside of sections. For tags it's not uncommon to be longer than the previous limit of 79 bytes. An example of a previously problem-causing tag is: which is needed for a Privoxy test for the banners-by-size filter. Previously it caused server failures like: 12:29:05.786961 ====> Client connect 12:29:05.787116 accept_connection 3 returned 4 12:29:05.787194 accept_connection 3 returned 0 12:29:05.787285 Read 119 bytes 12:29:05.787345 Process 119 bytes request 12:29:05.787407 Got request: GET /banners-by-size/9 HTTP/1.1 12:29:05.787464 Requested test number 9 part 0 12:29:05.787686 getpart() failed with error: -2 12:29:05.787744 - request found to be complete (9) 12:29:05.787912 getpart() failed with error: -2 12:29:05.788048 Wrote request (119 bytes) input to log/server.input 12:29:05.788157 Send response test9 section 12:29:05.788443 getpart() failed with error: -2 12:29:05.788498 instructed to close connection after server-reply 12:29:05.788550 ====> Client disconnect 0 12:29:05.871448 exit_signal_handler: 15 12:29:05.871714 signalled to die 12:29:05.872040 ========> IPv4 sws (port 21108 pid: 51758) exits with signal (15) --- diff --git a/tests/server/getpart.c b/tests/server/getpart.c index 483d378020..6c2cc68842 100644 --- a/tests/server/getpart.c +++ b/tests/server/getpart.c @@ -278,7 +278,7 @@ static int decodedata(char **buf, /* dest buffer */ int getpart(char **outbuf, size_t *outlen, const char *main, const char *sub, FILE *stream) { -# define MAX_TAG_LEN 79 +# define MAX_TAG_LEN 200 char couter[MAX_TAG_LEN + 1]; /* current outermost section */ char cmain[MAX_TAG_LEN + 1]; /* current main section */ char csub[MAX_TAG_LEN + 1]; /* current sub section */