User:Thickbrick Sleaford/HTTP Texture Notes

From Second Life Wiki
< User:Thickbrick Sleaford
Revision as of 17:47, 11 October 2010 by Thickbrick Sleaford (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

HTTP Texture Fetching on Different Servers

My notes on what different server implementations do with GetTexture requests. Maybe this info is useful to someone else too.

Some other relevant data:

Second Life Servers

Range requests work as expected, returning status 216, except when asking for ranges that don't overlap the satisfiable byte range:

$ CAP=<GetTexture cap url>
$ UUID=<your texture's UUID>
$ N=<The known filesize of the texture>
$ curl --range $N-99999999 --header "Accept: image/x-j2c" -D headers.txt "${CAP}/?texture_id=${UUID}" -o image.j2c

Returns the whole texture, with status code 216. What it should do is return status code 416. (See RFC 2616). This may mean that the viewer can't do ranged requests with ranges not beginning the the beginning of the file and expect it to work properly? See also SVC-6396.

Other notes:

  • The response headers are missing Content-range: header, even when doing a ranged request. SVC-6397
  • The request must have an "Accept: image/x-j2c" header for this to work.
  • The response headers contains Content-Type: text/html; charset=utf-8, even when delivering image/x-j2c.


Up to and Including

  • Has a bug where the returned data will be one byte short of the requested data.

Current Git Version

  • The response has a proper byte ranges header.
  • Returns 416 with an empty body if the range is not at least partially satisfiable (i.e. start >= length of file.)