2

网页出现400 Bad Request Request Header Or Cookie Too Large错误的解决方法

 2 years ago
source link: https://blog.p2hp.com/archives/9175
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

在开发项目过程中,突然遇到400 Bad Request Request Header Or Cookie Too Large的报错,我也是第一次出现这样的错误,感觉还是挺新奇的。

分析下出现错误的原因:

由request header过大所引起,request过大,通常是由于cookie中写入了较大的值所引起的。

解决办法:

采用nginx服务器的话修改方法:

/usr/local/nginx/conf

在这个路径下面,修改nginx.conf

http
{

include  mime.types;
default_type  application/octet-stream;
server_names_hash_bucket_size 128;
client_header_buffer_size 16k;  //这里默认是4K,改大一点就好了
large_client_header_buffers 4 32k;  //改大一点就好了 } 实例配置: 
http
{

**********

client_header_buffer_size 32k;

large_client_header_buffers 4 32k;

**********
}




About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK