httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: 'Range: bytes=' request with starting byte greater than size of f ile
Date Wed, 08 Sep 1999 00:20:40 GMT
I'd like to see Apache fully support byte-ranges. I do need to add
byte-range support to mod_dav in its PUT handler. While at the O'Reilly
conference, I found that I'm actually "not in spec" because I ignore
Content-* headers (you're supposed to fail a request if you don't
recognize any Content-* header; specifically, I don't allow a PUT to a
Content-Range).

Cheers,
-g

Dean Gaudet wrote:
> 
> On Fri, 27 Aug 1999, Life is hard, and then you die. wrote:
> 
> > I've created a patch for this, but it changes the semantics of
> > ap_set_byterange a bit: it now returns 0, 1, or 2 (for invalid, ok, and
> > unsatisfiable) instead of just 0 or 1. Is anybody like mod_perl or mod_php
> > using this function? (http_core and mod_mmap_static included in the patch
> > below) If not, I'll commit it.
> 
> ...
> 
> On Thu, 26 Aug 1999, Ritcey, Benjamin wrote:
> 
> > Dean Gaudet> want to submit a patch for it? :)
> >
> > Be careful of what you wish for... =)
> >
> > Is it evil to use r->status as a flag; e.g.,
> >
> > rangestatus = ap_set_byterange(r);
> >
> > if (rangestatus == HTTP_RANGE_NOT_SATISFIABLE){
> >   ap_log_rerror(APLOG_MARK, APLOG_NOERRNO|APLOG_ERR, r,
> >           "First byte of range request beyond end of requested file in
> > request %s (Range: %s, length: %u)",
> >               r->the_request, ap_table_get(r->headers_in,
> > "Range"),r->finfo.st_size);
> >   return HTTP_RANGE_NOT_SATISFIABLE;
> > }
> 
> I kind of like the idea of returning an HTTP status code from
> ap_set_byterange... so that you don't have to remember 0, 1, 2 magic
> constants.
> 
> otherwise I say go for it Ronald, thanks.
> 
> Dean

--
Greg Stein, http://www.lyra.org/

Mime
View raw message