2016-07-20 55 views
2

我公司推出的节点快递在我的本地:3000 ..如何更改请求头限制

**卷曲-H“samlresponse:12323” -v http://localhost:3000,正确返回数据。

,但如果我尝试以下...

卷曲-H 'samlresponse:{这里是整个samlresponse,这是非常long..almost 20K ..}' -v http://localhost:3000

的服务器总是返回“空服务器回复”,有没有办法通过或修复这个问题?

回答

1

Source Code of node at github说:

/* 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 

所以,你可能需要从源节点重建超越的80*1024极限。但是,我个人认为,这对于一个标题来说足够大,你应该重新判断你的statergy是否正确。

+0

谢谢,你拯救了我的生命 –

+0

干杯.. Gr8它hepled – Iceman

+0

@YinjunZhang cud你upvote也如果它帮助:D thanx – Iceman