Send 'Retry-After' to comply with RFC6585.
This commit is contained in:
parent
027093a5a5
commit
8d75aba7eb
29 changed files with 435 additions and 172 deletions
2
vendor/github.com/vulcand/oxy/utils/auth.go
generated
vendored
2
vendor/github.com/vulcand/oxy/utils/auth.go
generated
vendored
|
@ -6,6 +6,7 @@ import (
|
|||
"strings"
|
||||
)
|
||||
|
||||
// BasicAuth basic auth information
|
||||
type BasicAuth struct {
|
||||
Username string
|
||||
Password string
|
||||
|
@ -16,6 +17,7 @@ func (ba *BasicAuth) String() string {
|
|||
return fmt.Sprintf("Basic %s", encoded)
|
||||
}
|
||||
|
||||
// ParseAuthHeader creates a new BasicAuth from header values
|
||||
func ParseAuthHeader(header string) (*BasicAuth, error) {
|
||||
values := strings.Fields(header)
|
||||
if len(values) != 2 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue