Fixed ReplacePath rule executing out of order, when combined with PathPrefixStrip #1569
This commit is contained in:
parent
9e57a283d7
commit
3f68e382fd
4 changed files with 127 additions and 9 deletions
|
@ -1,6 +1,21 @@
|
|||
package testhelpers
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"io"
|
||||
"net/http"
|
||||
)
|
||||
|
||||
// Intp returns a pointer to the given integer value.
|
||||
func Intp(i int) *int {
|
||||
return &i
|
||||
}
|
||||
|
||||
// MustNewRequest creates a new http get request or panics if it can't
|
||||
func MustNewRequest(method, urlStr string, body io.Reader) *http.Request {
|
||||
request, err := http.NewRequest(method, urlStr, body)
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed to create HTTP %s Request for '%s': %s", method, urlStr, err))
|
||||
}
|
||||
return request
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue