1. 07 Aug, 2013 9 commits
    • Keith Randall's avatar
      runtime: convert .s textflags from numbers to symbolic constants. · 0273dc13
      Keith Randall authored
      Remove NOPROF/DUPOK from everything.
      
      Edits done with a script, except pclinetest.asm which depended
      on the DUPOK flag on main().
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12613044
      0273dc13
    • Pieter Droogendijk's avatar
      net/http: Various fixes to Basic authentication · a08b1d13
      Pieter Droogendijk authored
      There were some issues with the code sometimes using base64.StdEncoding,
      and sometimes base64.URLEncoding.
      Encoding basic authentication is now always done by the same code.
      
      Fixes #5970.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12397043
      a08b1d13
    • Ian Lance Taylor's avatar
      test: add cases to return.go that gccgo got wrong · 2b45124a
      Ian Lance Taylor authored
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12620043
      2b45124a
    • Ian Lance Taylor's avatar
      test: fix return.go to remove unused labels · 96c583b8
      Ian Lance Taylor authored
      The gc compiler only gives an error about an unused label if
      it has not given any errors in an earlier pass.  Remove all
      unused labels in this test because they don't test anything
      useful and they cause gccgo to give unexpected errors.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12580044
      96c583b8
    • Ian Lance Taylor's avatar
      test: fix return.go to not use fallthrough in a type switch · 5e0278b7
      Ian Lance Taylor authored
      The gc compiler only gives an error about fallthrough in a
      type switch if it has not given any errors in an earlier pass.
      Remove all functions in this test that use fallthrough in a
      type switch because they don't test anything useful and they
      cause gccgo to give unexpected errors.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12614043
      5e0278b7
    • Keith Randall's avatar
      cmd/ld: Put the textflag constants in a separate file. · 5a54696d
      Keith Randall authored
      We can then include this file in assembly to replace
      cryptic constants like "7" with meaningful constants
      like "(NOPROF|DUPOK|NOSPLIT)".
      
      Converting just pkg/runtime/asm*.s for now.  Dropping NOPROF
      and DUPOK from lots of places where they aren't needed.
      More .s files to come in a subsequent changelist.
      
      A nonzero number in the textflag field now means
      "has not been converted yet".
      
      R=golang-dev, daniel.morsing, rsc, khr
      CC=golang-dev
      https://golang.org/cl/12568043
      5a54696d
    • Alex Brainman's avatar
      net: fix small bug introduced by 48f7c4dd87fe · 60aa48c1
      Alex Brainman authored
      Fixes #6063
      
      R=golang-dev, r, dave
      CC=dvyukov, golang-dev
      https://golang.org/cl/12586043
      60aa48c1
    • Josh Bleecher Snyder's avatar
      net/http: do not send redundant Connection: close header in HTTP/1.0 responses · 1535727e
      Josh Bleecher Snyder authored
      HTTP/1.0 connections are closed implicitly, unless otherwise specified.
      
      Note that this change does not test or fix "request too large" responses.
      Reasoning: (a) it complicates tests and fixes, (b) they should be rare,
      and (c) this is just a minor wire optimization, and thus not really worth worrying
      about in this context.
      
      Fixes #5955.
      
      R=golang-dev, bradfitz
      CC=golang-dev
      https://golang.org/cl/12435043
      1535727e
    • Brad Fitzpatrick's avatar
      net/http: treat HEAD requests like GET requests · ebe91d11
      Brad Fitzpatrick authored
      A response to a HEAD request is supposed to look the same as a
      response to a GET request, just without a body.
      
      HEAD requests are incredibly rare in the wild.
      
      The Go net/http package has so far treated HEAD requests
      specially: a Write on our default ResponseWriter returned
      ErrBodyNotAllowed, telling handlers that something was wrong.
      This was to optimize the fast path for HEAD requests, but:
      
      1) because HEAD requests are incredibly rare, they're not
         worth having a fast path for.
      
      2) Letting the http.Handler handle but do nop Writes is still
         very fast.
      
      3) this forces ugly error handling into the application.
         e.g. https://code.google.com/p/go/source/detail?r=6f596be7a31e
         and related.
      
      4) The net/http package nowadays does Content-Type sniffing,
         but you don't get that for HEAD.
      
      5) The net/http package nowadays does Content-Length counting
         for small (few KB) responses, but not for HEAD.
      
      6) ErrBodyNotAllowed was useless. By the time you received it,
         you had probably already done all your heavy computation
         and I/O to calculate what to write.
      
      So, this change makes HEAD requests like GET requests.
      
      We now count content-length and sniff content-type for HEAD
      requests. If you Write, it doesn't return an error.
      
      If you want a fast-path in your code for HEAD, you have to do
      it early and set all the response headers yourself. Just like
      before. If you choose not to Write in HEAD requests, be sure
      to set Content-Length if you know it. We won't write
      "Content-Length: 0" because you might've just chosen to not
      write (or you don't know your Content-Length in advance).
      
      Fixes #5454
      
      R=golang-dev, dsymonds
      CC=golang-dev
      https://golang.org/cl/12583043
      ebe91d11
  2. 06 Aug, 2013 24 commits
  3. 05 Aug, 2013 7 commits