Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
8d6a12f5
Commit
8d6a12f5
authored
Apr 21, 2011
by
Brad Fitzpatrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
http: clarify docs on Request HTTP version
Fixes #910 R=adg, rsc1 CC=golang-dev
https://golang.org/cl/4439062
parent
750b6c63
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
src/pkg/http/dump.go
src/pkg/http/dump.go
+2
-0
src/pkg/http/request.go
src/pkg/http/request.go
+6
-3
No files found.
src/pkg/http/dump.go
View file @
8d6a12f5
...
...
@@ -31,6 +31,8 @@ func drainBody(b io.ReadCloser) (r1, r2 io.ReadCloser, err os.Error) {
// DumpRequest is semantically a no-op, but in order to
// dump the body, it reads the body data into memory and
// changes req.Body to refer to the in-memory copy.
// The documentation for Request.Write details which fields
// of req are used.
func
DumpRequest
(
req
*
Request
,
body
bool
)
(
dump
[]
byte
,
err
os
.
Error
)
{
var
b
bytes
.
Buffer
save
:=
req
.
Body
...
...
src/pkg/http/request.go
View file @
8d6a12f5
...
...
@@ -64,9 +64,12 @@ var reqExcludeHeader = map[string]bool{
// A Request represents a parsed HTTP request header.
type
Request
struct
{
Method
string
// GET, POST, PUT, etc.
RawURL
string
// The raw URL given in the request.
URL
*
URL
// Parsed URL.
Method
string
// GET, POST, PUT, etc.
RawURL
string
// The raw URL given in the request.
URL
*
URL
// Parsed URL.
// The protocol version for incoming requests.
// Outgoing requests always use HTTP/1.1.
Proto
string
// "HTTP/1.0"
ProtoMajor
int
// 1
ProtoMinor
int
// 0
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment