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

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 29 2025 23:49:15
Script start
Timing: Jan 29 2025 23:49:15
Module start 'layout'
Timing: Jan 29 2025 23:49:15
Module start 'content'
Timing: Jan 29 2025 23:49:15
Module end 'content'
Timing: Jan 29 2025 23:49:15
Script end

Main resources:

Total runtime0.0171 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0048 588.3906151.2422
Module start 'layout' 0.00480.0024 739.632836.7188
Module start 'content' 0.00720.0083 776.351690.1406
Module end 'content' 0.01550.0015 866.492229.9766
Script end 0.0171  896.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002313.4599140.0002
Check MTime0.00105.9106140.0001
Mysql Total
Database connection0.00084.715110.0008
Mysqli_queries0.002313.483530.0008
Looping result0.00000.071110.0000
Template Total0.00116.710.0011
Template load0.00084.867010.0008
Template processing0.00031.816910.0003
Override
Cache load0.00053.156010.0005
General
dbfile0.003419.867980.0004
String conversion0.00000.040440.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs