Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(30)

Side by Side Diff: src/pkg/net/http/server.go

Issue 5345045: code review 5345045: renaming_3: gofix -r go1pkgrename src/pkg/[m-z]* (Closed)
Patch Set: diff -r 94794514aca0 https://go.googlecode.com/hg/ Created 13 years, 5 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/net/http/serve_test.go ('k') | src/pkg/net/http/sniff_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // HTTP server. See RFC 2616. 5 // HTTP server. See RFC 2616.
6 6
7 // TODO(rsc): 7 // TODO(rsc):
8 // logging 8 // logging
9 9
10 package http 10 package http
11 11
12 import ( 12 import (
13 "bufio" 13 "bufio"
14 "bytes" 14 "bytes"
15 "crypto/rand" 15 "crypto/rand"
16 "crypto/tls" 16 "crypto/tls"
17 "errors" 17 "errors"
18 "fmt" 18 "fmt"
19 "io" 19 "io"
20 "io/ioutil" 20 "io/ioutil"
21 "log" 21 "log"
22 "net" 22 "net"
23 "net/url"
23 "path" 24 "path"
24 "runtime/debug" 25 "runtime/debug"
25 "strconv" 26 "strconv"
26 "strings" 27 "strings"
27 "sync" 28 "sync"
28 "time" 29 "time"
29 "url"
30 ) 30 )
31 31
32 // Errors introduced by the HTTP server. 32 // Errors introduced by the HTTP server.
33 var ( 33 var (
34 ErrWriteAfterFlush = errors.New("Conn.Write called after Flush") 34 ErrWriteAfterFlush = errors.New("Conn.Write called after Flush")
35 ErrBodyNotAllowed = errors.New("http: response status code does not all ow body") 35 ErrBodyNotAllowed = errors.New("http: response status code does not all ow body")
36 ErrHijacked = errors.New("Conn has been hijacked") 36 ErrHijacked = errors.New("Conn has been hijacked")
37 ErrContentLength = errors.New("Conn.Write wrote more than the declared Content-Length") 37 ErrContentLength = errors.New("Conn.Write wrote more than the declared Content-Length")
38 ) 38 )
39 39
(...skipping 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
1180 func (tw *timeoutWriter) WriteHeader(code int) { 1180 func (tw *timeoutWriter) WriteHeader(code int) {
1181 tw.mu.Lock() 1181 tw.mu.Lock()
1182 if tw.timedOut || tw.wroteHeader { 1182 if tw.timedOut || tw.wroteHeader {
1183 tw.mu.Unlock() 1183 tw.mu.Unlock()
1184 return 1184 return
1185 } 1185 }
1186 tw.wroteHeader = true 1186 tw.wroteHeader = true
1187 tw.mu.Unlock() 1187 tw.mu.Unlock()
1188 tw.w.WriteHeader(code) 1188 tw.w.WriteHeader(code)
1189 } 1189 }
OLDNEW
« no previous file with comments | « src/pkg/net/http/serve_test.go ('k') | src/pkg/net/http/sniff_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b