mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-23 11:01:49 +01:00
Add ToDo
This commit is contained in:
parent
01e9853161
commit
84f73d9db8
1 changed files with 5 additions and 2 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
"net/url"
|
||||
"strings"
|
||||
|
||||
"code.gitea.io/gitea/modules/log"
|
||||
"code.gitea.io/gitea/modules/setting"
|
||||
"code.gitea.io/gitea/modules/validation"
|
||||
|
||||
|
@ -58,7 +59,7 @@ func (id ActorID) Validate() []string {
|
|||
result = append(result, validation.ValidateNotEmpty(id.UnvalidatedInput, "unvalidatedInput")...)
|
||||
|
||||
if id.UnvalidatedInput != id.AsURI() {
|
||||
result = append(result, fmt.Sprintf("not all input: %q was parsed: %q", id.UnvalidatedInput, id.AsURI()))
|
||||
result = append(result, fmt.Sprintf("not all input was parsed, \nUnvalidated Input:%q \nParsed URI: %q", id.UnvalidatedInput, id.AsURI()))
|
||||
}
|
||||
|
||||
return result
|
||||
|
@ -178,6 +179,8 @@ func removeEmptyStrings(ls []string) []string {
|
|||
|
||||
func newActorID(uri string) (ActorID, error) {
|
||||
validatedURI, err := url.ParseRequestURI(uri)
|
||||
log.Info("Validated URI is: %v", validatedURI)
|
||||
log.Info("Input is: %v", validatedURI)
|
||||
if err != nil {
|
||||
return ActorID{}, err
|
||||
}
|
||||
|
@ -195,7 +198,7 @@ func newActorID(uri string) (ActorID, error) {
|
|||
result.Host = validatedURI.Hostname()
|
||||
result.Path = pathWithoutActorID
|
||||
result.Port = validatedURI.Port()
|
||||
result.UnvalidatedInput = validatedURI.String()
|
||||
result.UnvalidatedInput = validatedURI.String() // ToDo: Whats happening here?
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue