moved Read/Send code to http.Connection

This commit is contained in:
Altair-sh
2026-11-04 03:32:36 +01:00
parent 59f7d873be
commit 0ecbb629ea
10 changed files with 297 additions and 274 deletions
+12
View File
@@ -0,0 +1,12 @@
package server
import "serveg/internal/http"
// TODO implement file uploading
func (conn *TcpConnection) handleUpload(req *http.Request) *http.Response {
// TODO: use os.OpenFile(filePath + ".upload", os.O_CREATE|os.O_EXCL|os.O_WRONLY, 0o644)
// if such file exists, send response like
// "somebody is uploading such file right now"
// TODO: defer { if !renamed { os.Remove(tmp) } }
panic("unimplemented")
}