Forums / Developer / eZHTTPTool::parseHTTPResponse and chunked transfer encoding
Marko Žmak
Monday 06 June 2011 6:09:42 pm
It seems like the eZHTTPTool::parseHTTPResponse doesn't parse the body of response that has "Transfer-Encoding: chunked" header. Actually the body is left as it is and the chunks are not concatenated together in one piece.
So, is this wanted behaviour?
If it is, then it would be nice to add a method that parses the chunks and gives back the body in one piece...
(or is there already such a function?)
-- Nothing is impossible. Not if you can imagine it! Hubert Farnsworth
Brandon Chambers
Tuesday 07 June 2011 3:22:38 pm
Seems like it's intended, I guess it depends on what the content/type headers say. It gives the user more power to implement it how they see fit. A downside is a lack of support for different types of content. But is it worth it for eZ Systems to implement a bunch of different handlers per content type? Probably not.
I found a few references of its use in the kernel as well as the class definition in doxygen.
[ezroot]/kernel/setup/steps/ezstep_site_types.php
[ezroot]/kernel/shop/classes/exchangeratehandlers/ezecb/ezecbhandler.php
I didn't see any issues (open nor resolved) for parseHTTPResponse that pertain to your question either.
Brandon Chambers brandon@granitehorizon.com blog: http://blog.divdesigns.com Granite Horizon / http://granitehorizon.com