Handle empty path again
This commit is contained in:
parent
49c7ad61df
commit
66f6156ceb
|
@ -169,7 +169,7 @@ func handleConn(conn *tls.Conn, baseURL, title, home_message string) {
|
||||||
// profile
|
// profile
|
||||||
if strings.HasPrefix(path, "/profile/") {
|
if strings.HasPrefix(path, "/profile/") {
|
||||||
// skip prefix
|
// skip prefix
|
||||||
path = path[8:]
|
path = path[9:]
|
||||||
_, err = strconv.ParseUint(path, 10, 64)
|
_, err = strconv.ParseUint(path, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Println("invalid request: %s", err)
|
log.Println("invalid request: %s", err)
|
||||||
|
@ -186,7 +186,7 @@ func handleConn(conn *tls.Conn, baseURL, title, home_message string) {
|
||||||
printProfile(conn, baseURL, path)
|
printProfile(conn, baseURL, path)
|
||||||
} /* thread */ else if strings.HasPrefix(path, "/thread/") {
|
} /* thread */ else if strings.HasPrefix(path, "/thread/") {
|
||||||
// skip prefix
|
// skip prefix
|
||||||
path = path[7:]
|
path = path[8:]
|
||||||
|
|
||||||
_, err = strconv.ParseUint(path, 10, 64)
|
_, err = strconv.ParseUint(path, 10, 64)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue