为什么会显示此警告:“在大块解析器中接收到问题2”? [英] Why is this warning being shown: "Received problem 2 in the chunky parser"?

查看:352
本文介绍了为什么会显示此警告:“在大块解析器中接收到问题2”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试使用PHP和cURL登录网站(即 Craigslist )。当访问脚本时,我收到此警告消息:

I am trying to use PHP and cURL to log in to a website (namely Craigslist). When accessing the script, I get this warning message:

Received problem 2 in the chunky parser

搜索显示它不是与cURL相关的问题。我找不到问题的根源。可能是什么原因?

Searches showed that it is not a problem associated with cURL. I am unable to find the source of the problem. What may be the reason?

谢谢。

推荐答案

:Google搜索错误消息,我还找到

Update: Googling for the error message, I also find this:


当curl期望一个分块的HTTP响应主体,然后没有得到一个chunky分析器错误消息发生。您的回复发送 Transfer-Encoding:chunked 头,因此curl希望看到根据RFC2616的块分割,并且没有得到一个。

The chunky-parser error message occurs when curl expects a chunked HTTP response body and then doesn't get one. Your reply sends the Transfer-Encoding: chunked header, so curl expects to see a body chunked according to RFC2616 and it doesn't get one.

显然,重定向不应该有一个响应体,或者甚至不必以 Transfer-Encoding 头开头。你可以尝试覆盖头,但也许CouchDB无条件插入它,在这种情况下,我们应该修复,如果你发现你不能覆盖 Transfer-Encoding 头,可以你提交一个错误报告?

Obviously, a redirect shouldn't have a response body or even the Transfer-Encoding header to begin with. You could try overriding the header, but maybe CouchDB inserts it unconditional in which case we should fix that, if you find out you can't override the Transfer-Encoding header, can you file a bug report?

我不知道在获取任意页面的上下文中要做什么。

I have no idea what to make out of this in the context of fetching an arbitrary page, though.

原始帖子:

有一个 CouchDB错误报告 处理同一问题以及多字节数据。 Craigslist似乎运行在ISO-8859-1,也许广告(或任何你正在获取)有UTF-8字符。

There's a CouchDB Bug report dealing with the same issue in conjunction with multi-byte data. Craigslist seems to run in ISO-8859-1, maybe the ad (or whatever you are fetching) has UTF-8 characters in it?

这篇关于为什么会显示此警告:“在大块解析器中接收到问题2”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆