mirror of
https://github.com/gin-gonic/gin.git
synced 2026-07-13 14:41:33 +08:00
Compare commits
No commits in common. "990c44aebf20f0796d99051e53d6ee75b7ed52fb" and "ab8042e9e5370bbe0e93ea5adc6e74ae4c5df95e" have entirely different histories.
990c44aebf
...
ab8042e9e5
1
auth.go
1
auth.go
@ -91,7 +91,6 @@ func authorizationHeader(user, password string) string {
|
||||
return "Basic " + base64.StdEncoding.EncodeToString(bytesconv.StringToBytes(base))
|
||||
}
|
||||
|
||||
// BasicAuthForProxy returns a Basic HTTP Proxy-Authorization middleware.
|
||||
func BasicAuthForProxy(accounts Accounts, realm string) HandlerFunc {
|
||||
if realm == "" {
|
||||
realm = "Proxy Authorization Required"
|
||||
|
||||
@ -1044,7 +1044,7 @@ func TestContextRenderAndEscapeAttachment(t *testing.T) {
|
||||
c.FileAttachment("./gin.go", maliciousFilename)
|
||||
|
||||
assert.Equal(t, 200, w.Code)
|
||||
assert.Contains(t, w.Body.String(), "func New(opts ...OptionFunc) *Engine {")
|
||||
assert.Contains(t, w.Body.String(), "func New() *Engine {")
|
||||
assert.Equal(t, fmt.Sprintf("attachment; filename=\"%s\"", actualEscapedResponseFilename), w.Header().Get("Content-Disposition"))
|
||||
}
|
||||
|
||||
|
||||
@ -12,8 +12,6 @@ import (
|
||||
|
||||
// BindWith binds the passed struct pointer using the specified binding engine.
|
||||
// See the binding package.
|
||||
//
|
||||
// Deprecated: Use MustBindWith or ShouldBindWith.
|
||||
func (c *Context) BindWith(obj any, b binding.Binding) error {
|
||||
log.Println(`BindWith(\"any, binding.Binding\") error is going to
|
||||
be deprecated, please check issue #662 and either use MustBindWith() if you
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user