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
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
src/pkg/net/http/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