Node.js HTTP Get URL Length limitation
There is a built-in request size limit enforced by Node. Requested headers + URI should not be more than 80 kb.
As it is defined in http_parser.h#L55:
/* Maximium header size allowed */
#define HTTP_MAX_HEADER_SIZE (80*1024)
Asuming that UTF-8 character can be between 1 and 4 bytes, the size of a string with 50 000 characters would be from 50 000 to 200 000 bytes, or from ~48kb to 195kb.
UPDATE
In newer versions of NodeJS (v12.6.0+), the header request size limit is 8kb by default, and this also impacts the response header size. To use header sizes above 8KB, you can use the switch --max-http-header-size 65535
(or whatever size you need).
This is described in-depth here.