Implement parseContentType.

This commit is contained in:
Juliusz Chroboczek
2024-04-09 15:30:11 +02:00
parent c4c7d0b60d
commit e14eec86d3
2 changed files with 23 additions and 0 deletions
+4
View File
@@ -9,6 +9,10 @@ import (
"github.com/jech/galene/stats"
)
func parseContentType(ctype string) string {
return strings.Trim(strings.Split(ctype, ";")[0], " ")
}
func apiHandler(w http.ResponseWriter, r *http.Request) {
username, password, ok := r.BasicAuth()
if !ok {