Why is this warning displayed: "Received problem 2 in narrow parser"?

I am trying to use PHP and cURL to enter a site (namely Craigslist ). When accessing the script, I get this warning:

Received problem 2 in the chunky parser 

Searches have shown that this is not a cURL related issue. I can not find the source of the problem. What could be the reason?

Thanks.

+6
php curl craigslist
source share
2 answers

Update: Google for the error message, I also found this :

The chanky-parser error message occurs when curl expects the fragmented body of an HTTP response and then does not receive it. Your answer sends the Transfer-Encoding: chunked header, so curl expects the body to be broken by RFC2616 and it will not receive it.

Obviously, there should not be a response body or even a Transfer-Encoding header for redirection. You can try to redefine the header, but perhaps CouchDB inserts it unconditionally, in which case we should fix it if you find that you cannot redefine the Transfer-Encoding header, can you file an error report?

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

Original post:

There is a CouchDB Bug Report dedicated to the same issue in conjunction with multibyte data. Craigslist seems to work in ISO-8859-1, maybe the ad (or whatever you choose) has UTF-8 characters in it?

+5
source share

"Received problem 2 in a narrow parser" is an error message from libcurl. The specific β€œproblem 2” refers to CHUNKE_ILLEGAL_HEX, which is an internal error code identifying an illegal stream with encoded encoding.

Quite a lot of what Pekka's answer has already said ...

+1
source share

All Articles