1. 23 Dec, 2014 9 commits
  2. 22 Dec, 2014 27 commits
  3. 21 Dec, 2014 2 commits
  4. 20 Dec, 2014 2 commits
    • Jed Denlea's avatar
      net/http: Fix Range off-by-one error · 474ce690
      Jed Denlea authored
      Given a file of size N, a request for "Range: bytes=N-*" should
      return a 416 [1].  Currently, it returns a 206 and a body of 0
      bytes, with the illegal Content-Range of "bytes N-(N-1)/N" [2].
      
      [1]: RFC 7233, sec 2.1: "If a valid byte-range-set includes at least one
      byte-range-spec with a first-byte-pos that is less than the current
      length of the representation, [...]".  sec 3.1: "If all of the
      preconditions are true, the server supports the Range header field for
      the target resource, and the specified range(s) are invalid or
      unsatisfiable, the server SHOULD send a 416 (Range Not Satisfiable)
      response."
      
      [2]: RFC 7233, sec 4.2: "A Content-Range field value is invalid if it
      contains a byte-range-resp that has a last-byte-pos value less than its
      first-byte-pos value, [...]"
      
      Fixes #8988
      
      Change-Id: If3e1134e7815f5d361efea01873b29aafe3de817
      Reviewed-on: https://go-review.googlesource.com/1862Reviewed-by: default avatarBrad Fitzpatrick <bradfitz@golang.org>
      474ce690
    • mischief's avatar
      runtime: fix brk_ signature for plan9 · 640c0f38
      mischief authored
      with uintptr, the check for < 0 will never succeed in mem_plan9.go's
      sbrk() because the brk_ syscall returns -1 on failure. fixes the plan9/amd64 build.
      
      this failed on plan9/amd64 because of the attempt to allocate 136GB in mallocinit(),
      which failed. it was just by chance that on plan9/386 allocations never failed.
      
      Change-Id: Ia3059cf5eb752e20d9e60c9619e591b80e8fb03c
      Reviewed-on: https://go-review.googlesource.com/1590Reviewed-by: default avatarAnthony Martin <ality@pbrane.org>
      Reviewed-by: default avatarDavid du Colombier <0intro@gmail.com>
      Reviewed-by: default avatarAram Hăvărneanu <aram@mgk.ro>
      640c0f38