-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #141 from fastly/dkegel-pluggable-urlparser
fsthttp: SetParseRequestURI now lets you register a url parser
- Loading branch information
Showing
2 changed files
with
18 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
//go:build fastlyinternalsetparseuri | ||
|
||
package fsthttp | ||
|
||
import ( | ||
"net/url" | ||
) | ||
|
||
// SetParseRequestURI takes a function like url.ParseRequestURI to use when parsing incoming requests | ||
// It is an experimental interface for applications that want to relax restrictions on url parsing | ||
// It should generally not be needed, and is likely to change, so please avoid unless absolutely necessary | ||
func SetParseRequestURI(parseRequestURI func(string)(*url.URL, error)) { | ||
_parseRequestURI = parseRequestURI | ||
} |