Am 09.07.14 21:18, schrieb Jeff Rogers:
> If I understand correctly, this codepath if used for a non-file based
> return, so e.g., "ns_return -binary" should get here.
The code paths are more complex and depend also on the settings of the 
configuration file (e.g. caching, mmap, ...);

when i was working on the async writer i created the call-graph [1] 
below (manually, might contain errors; just did if for the parts i was 
interested in). ReturnRange() is reached for file-descriptor based and 
for data based deliveries

> It's looks to be looping over the ranges set from Ns_ConnParseRange, but
> using index 0 instead of index i.

that is of course a (potential) bug, although the particular path is not 
met from the test cases (we have currently 42 test cases for range 
requests, covering single and multiple byte ranges).

> I would expect the result to be that
> the first requested range is returned multiple times, but it seems to
> return multiple ranges just fine.  I was able to construct a failing
> byterange test with an incorrect length (if the multiple ranges are
> different sizes rather than all the same size), but the content is still
> correct, which is puzzling.
>
> Also, it looks like ranges aren't supported at all for character data
> (e.g., adp responses or non-binary ns_return).  Is this intentional and
> desirable?  It seems reasonable at first glance, since the most useful
> use case for ranges is large binaries, but it seems a bit inconsistent.
as mentioned a while earlier on the list, the call graph of the data 
delivery logic
is quite complex and might be simplified. I've simplified it in some 
steps when
working on the async writer, but still, more can be done.

yes, currently range requests are ignored for e.g. .adp requests, but they
are -supposed to be  - fully supported on file-requests, which are in 
practice
the most important cases (e.g. various pdf readers depend on this, i think
i have seen this as well range requests on video formats).

Seems that so far, no-one had needs for range requests on dynamic content,
which is often useless (e.g. language settings lead to different message 
strings
on systems like e.g. OpenACS), but there might certainly be use-cases 
for that.

the best start is usually to add a test case. I've added a test case 
showing that
range requests are ignored on .adp requests.

-gustaf neumann

[1] http://openacs.org/xowiki/file/writer.png



------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
naviserver-devel mailing list
naviserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/naviserver-devel

Reply via email to