Forums / Developer / eZHTTPTool::parseHTTPResponse and chunked transfer encoding

eZHTTPTool::parseHTTPResponse and chunked transfer encoding

Author Message

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

eZ debug

Timing: Jan 17 2025 23:53:05
Script start
Timing: Jan 17 2025 23:53:05
Module start 'content'
Timing: Jan 17 2025 23:53:06
Module end 'content'
Timing: Jan 17 2025 23:53:06
Script end

Main resources:

Total runtime0.8940 sec
Peak memory usage4,096.0000 KB
Database Queries191

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0070 587.9688180.8047
Module start 'content' 0.00700.7826 768.7734542.8984
Module end 'content' 0.78960.1044 1,311.6719332.7109
Script end 0.8939  1,644.3828 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00480.5314210.0002
Check MTime0.00210.2306210.0001
Mysql Total
Database connection0.00100.106310.0010
Mysqli_queries0.805590.09491910.0042
Looping result0.00160.17411890.0000
Template Total0.863896.620.4319
Template load0.00300.334120.0015
Template processing0.860896.280620.4304
Template load and register function0.00020.024410.0002
states
state_id_array0.00160.181710.0016
state_identifier_array0.00120.133020.0006
Override
Cache load0.00190.2119160.0001
Sytem overhead
Fetch class attribute can translate value0.00100.110130.0003
Fetch class attribute name0.00200.222640.0005
XML
Image XML parsing0.00830.932830.0028
class_abstraction
Instantiating content class attribute0.00000.000640.0000
General
dbfile0.01872.0920350.0005
String conversion0.00000.000730.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
2content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 8
 Number of unique templates used: 5

Time used to render debug report: 0.0002 secs