Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a large JSON file which consists of xyz records. I'm looking for a way to retrieve parts of the file and have been reading the http-specs on how to define HTTP range-headers in Apache.

The spec mentions that it is possible to define custom-range entities (vs the default 'byte') akin to the tutorial here.

I'm pretty green-eared regarding any apache httpd.conf modifications, so pretty basic questions:

  • can I declare more than one entity (for example byte and record)
  • if I declare "record" as an entity and specify a range of records to retrieve, how does apache know "what a record is" = where should I put the logic to tell Apache? that my JSON file consists of records and a record is ... this and that...

Thanks for some insights!

share|improve this question
It strikes me that, since JSON has an internal structure, that any byte ranges would have to be very specific to avoid reparsing the file at the remote end - but that then means implementing application logic in the webserver config matched to specific logic in the client to splice the file back again into soething meaningful. This sounds like a very bad way to solve the problem - a better approach would be to slice and dice the data using the application logic (PHP/Java/ASP...) – symcbean Mar 5 '13 at 10:40
I agree it would better to do this inside the application itself. Still I was wondering, if I declared "record" as entity vs. "byte", if I could pull a range of records from a large JSON file (say 1-9,14-15,299-301). My application logic would tell the client just which ids to pull. – frequent Mar 5 '13 at 10:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.