通过浏览器向web服务传递base64码的图片时遇到参数过长的问题?

解决办法:查看aiohttp的源码:aiohttp/http_parser.py下找到:

class HeadersParser:
def __init__(self,
max_line_size: int=8190,
max_headers: int=32768,
max_field_size: int=8190) -> None:
self.max_line_size = max_line_size
self.max_headers = max_headers
self.max_field_size = max_field_size

修改为:

class HeadersParser:
def __init__(self,
max_line_size: int=81900,
max_headers: int=32768,
max_field_size: int=81900) -> None:
self.max_line_size = max_line_size
self.max_headers = max_headers
self.max_field_size = max_field_size

def parse_headers(
self,
lines: List[bytes]
) -> Tuple['CIMultiDictProxy[str]', RawHeaders]:
headers = CIMultiDict() # type: CIMultiDict[str]
raw_headers = []

lines_idx = 1
line = lines[1]
line_count = len(lines)

def parse_headers(
self,
lines: List[bytes]
) -> Tuple['CIMultiDictProxy[str]', RawHeaders]:
headers = CIMultiDict() # type: CIMultiDict[str]
raw_headers = []

lines_idx = 1
line = lines[1]
line_count = len(lines)

可以按照自己想要的长度修改max_field_size和max_line_size的值

aiohttp上报:Got more than 8190 bytes (10160) when reading Status line is too long.错误的解决办法的更多相关文章

  1. php内存溢出,出现Allowed memory size of 8388608 bytes exhausted错误的解决办法

    是因为php页面消耗的最大内存默认是为128M (在PHP的ini件里可以看到) ,如果文件太大或图片太大在读取的时候会发生上述错误. 解决办法: 1.修改 php.ini 将memory_limit ...

  2. PHP运行错最有效解决办法Fatal error: Out of memory (allocated 786432) (tried to allocate 98304 bytes) in H:\freehost\zhengbao2\web\includes\lib_common.php on line 744

    原文 PHP运行错最有效解决办法Fatal error: Out of memory (allocated 6029312) Fatal error: Out of memory (allocated ...

  3. MySQL错误“Specified key was too long; max key length is 1000 bytes”的解决办法

    MySQL错误"Specified key was too long; max key length is 1000 bytes"的解决办法 经过查询才知道,是Mysql的字段设置 ...

  4. Got a packet bigger than‘max_allowed_packet’bytes错误的解决方法

    通常项目上线前都有一些初始化数据需要导入,在今天博客系统发布前我使用sqlyog工具远程登录服务器的Mysql数据库,执行sql脚本对初始数据进行导入的时候报错: Got a packet bigge ...

  5. python print 打印的数据包含中文,打印报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position 459-460: illegal multibyte sequence解决办法

    python 2.7 print 的数据中若包括中文,打印则会报错UnicodeDecodeError: 'gbk' codec can't decode bytes in position 459- ...

  6. soapui加载天气预报接口报错Characters larger than 4 bytes are not supported: byte 0xb1 implies a length of more than 4 byte的解决办法

    soapui加载天气预报接口时报错如下: Error loading [http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl ...

  7. js replace 全局替换 以表单的方式提交参数 判断是否为ie浏览器 将jquery.qqFace.js表情转换成微信的字符码 手机端省市区联动 新字体引用本地运行可以获得,放到服务器上报404 C#提取html中的汉字 MVC几种找不到资源的解决方式 使用Windows服务定时去执行一个方法的三种方式

    js replace 全局替换   js 的replace 默认替换只替换第一个匹配的字符,如果字符串有超过两个以上的对应字符就无法进行替换,这时候就要进行一点操作,进行全部替换. <scrip ...

  8. aiohttp上报405: Method Not Allowed

    请求方式不对,修改为“POST”或者“GET” 可参考:https://blog.csdn.net/yiifaa/article/details/80928487

  9. 使用TarOutputStream出现 request to write '1024' bytes exceeds size in header错误的解决方法

    因为测试流程中,所测客户端会根据服务器A返回的response决定发送给服务器B的请求里各参数的值,所以现在需要模拟服务器的响应.而这个项目服务器A的响应式返回一个流,一个GZIP压缩格式流,压缩的是 ...

随机推荐

  1. MySQL语句优化方法(简单版)

    基础回顾: sql语句是怎么样运行的? 一般来说,客户端发送sql语句到数据库服务器——数据库服务器进行运算并返回结果——客户端显示sql语句运行结果. 在本地运行时以workbench为例,客户端为 ...

  2. BJSV-P-004无缝大屏显示

    无缝大屏显示 北京太速科技有限公司在线客服:QQ:448468544 淘宝网站:orihard.taobao.com/?联系电话:15084122580 欢迎关注微信公众号 啊智能时代

  3. 《深入学习Redis(1):Redis内存模型 》笔记,待完善

    参考资料 https://www.cnblogs.com/kismetv/p/8654978.html 一.内存统计 info memory 查看内存统计 五.应用举例

  4. ltp-ddt genload

    under folder tools\genload   genload.c             "`%s' imposes certain types of compute stres ...

  5. Python3.5-20190526-廖老师-自我笔记-单元测试-参数换-paramunittest

    参数化: import timeimport list1 #想测试list1中的求和函数是否正确fun1import paramunittestimport unittest #先设置参数组@para ...

  6. Maven POM中的各种scope的行为总结

    compile:默认的scope.任何定义在compile scope下的依赖将会在所有的class paths下可用.maven工程会将其打包到最终的artifact中.如果你构建一个WAR类型的a ...

  7. nyoj 78:圈水池 【凸包入门】

    题目链接 将所有点按从左至右顺序排序,然后将所有点先从左到右扫描再从右到左扫描,逐渐将凸包轮廓“勾勒”出来 (凸包轮廓满足,轮廓上连续的三个点按先后顺序给出的话呈逆时针方向) 最后删去一个重复的起(终 ...

  8. nuget cli 打包发包

    微软官网打包说明:https://docs.microsoft.com/zh-cn/nuget/quickstart/create-and-publish-a-package-using-visual ...

  9. vue项目中echarts使用渐变效果报错echarts is not defined

    解决办法:在当前单组件中在引用一次

  10. 查完数据库order_by后跟[:9]切片取前9位的值