Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
253d7f04
Commit
253d7f04
authored
May 29, 2012
by
Brad Fitzpatrick
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
net/http: better comment in hasToken
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/6249065
parent
2d1fa089
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
header.go
src/pkg/net/http/header.go
+5
-0
No files found.
src/pkg/net/http/header.go
View file @
253d7f04
...
...
@@ -99,6 +99,11 @@ func hasToken(v, token string) bool {
}
for
sp
:=
0
;
sp
<=
len
(
v
)
-
len
(
token
);
sp
++
{
// Check that first character is good.
// The token is ASCII, so checking only a single byte
// is sufficient. We skip this potential starting
// position if both the first byte and its potential
// ASCII uppercase equivalent (b|0x20) don't match.
// False positives ('^' => '~') are caught by EqualFold.
if
b
:=
v
[
sp
];
b
!=
token
[
0
]
&&
b
|
0x20
!=
token
[
0
]
{
continue
}
...
...
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