~ubuntu-branches/ubuntu/saucy/golang/saucy

« back to all changes in this revision

Viewing changes to src/pkg/net/http/response.go

  • Committer: Package Import Robot
  • Author(s): Ondřej Surý, Ondřej Surý, Michael Stapelberg
  • Date: 2012-06-28 12:14:15 UTC
  • mfrom: (1.1.15)
  • Revision ID: package-import@ubuntu.com-20120628121415-w1b0076ixkarr1ml
[ Ondřej Surý ]
* Imported Upstream version 1.0.2
* Update Vcs fields to reflect new git repository location
* Kill get-orig-source, since 1.0.0, the tarballs can be downloaded
  from webpage

[ Michael Stapelberg ]
* golang-mode: use debian-pkg-add-load-path-item (Closes: #664802)
* Add manpages (Closes: #632964)
* Use updated pt.po from Pedro Ribeiro (Closes: #674958)

Show diffs side-by-side

added added

removed removed

Lines of Context:
202
202
                        text = "status code " + strconv.Itoa(r.StatusCode)
203
203
                }
204
204
        }
205
 
        io.WriteString(w, "HTTP/"+strconv.Itoa(r.ProtoMajor)+".")
206
 
        io.WriteString(w, strconv.Itoa(r.ProtoMinor)+" ")
207
 
        io.WriteString(w, strconv.Itoa(r.StatusCode)+" "+text+"\r\n")
 
205
        protoMajor, protoMinor := strconv.Itoa(r.ProtoMajor), strconv.Itoa(r.ProtoMinor)
 
206
        statusCode := strconv.Itoa(r.StatusCode) + " "
 
207
        if strings.HasPrefix(text, statusCode) {
 
208
                text = text[len(statusCode):]
 
209
        }
 
210
        io.WriteString(w, "HTTP/"+protoMajor+"."+protoMinor+" "+statusCode+text+"\r\n")
208
211
 
209
212
        // Process Body,ContentLength,Close,Trailer
210
213
        tw, err := newTransferWriter(r)