express icon indicating copy to clipboard operation
express copied to clipboard

Is there a way to set the request header limitation?

Open zhyinjun opened this issue 10 years ago • 3 comments

I lunched the node express on my localhost:3000..

http://localhost:3000

curl -H 'samlresponse:12323' -v http://localhost:3000 , this command line works fine.

but if I tried following...

curl -H 'samlresponse:{here is the entire samlresponse, it's very long..}' -v http://localhost:3000 , the server always return "Empty reply from server", is there a way to passby or fix this issue?

zhyinjun avatar Jul 20 '16 04:07 zhyinjun

We won't be able to find out the cause without looking at the source code.

Please post general queries, such as this one, at https://gitter.im/expressjs/express.

hacksparrow avatar Jul 20 '16 07:07 hacksparrow

I tried to replicate the issue, i don't know if you send the samlresponse like you wrote, but in this case the problem is with the quotation mark in "it's"

emanuelemoccia avatar Jul 20 '16 07:07 emanuelemoccia

https://github.com/nodejs/node/blob/master/deps/http_parser/http_parser.h

/* Maximium header size allowed. If the macro is not defined * before including this header then the default is used. To * change the maximum header size, define the macro in the build * environment (e.g. -DHTTP_MAX_HEADER_SIZE=<value>). To remove * the effective limit on the size of the header, define the macro * to a very large number (e.g. -DHTTP_MAX_HEADER_SIZE=0x7fffffff) */ #ifndef HTTP_MAX_HEADER_SIZE # define HTTP_MAX_HEADER_SIZE (80*1024) #endif

zhyinjun avatar Jul 27 '16 05:07 zhyinjun