A working proxy exists.

This commit is contained in:
2021-02-27 22:25:50 +01:00
parent ce94bf0d89
commit 617d7834cc
29 changed files with 781 additions and 195 deletions

View File

@@ -30,7 +30,6 @@ func main() {
}
func handle(w http.ResponseWriter, r *http.Request) {
log.Infoln("handle")
if r.Method != http.MethodPost {
http.Error(w, "Unsupported method", http.StatusMethodNotAllowed)
@@ -56,6 +55,8 @@ func handle(w http.ResponseWriter, r *http.Request) {
response = handlePrintJob(request, r.Body)
case ipp.GetJobs:
response = handleGetJobs(request)
case ipp.ValidateJob:
response = handleValidateJob(request)
default:
response = ipp.NewResponse(ipp.ClientErrorBadRequest, request.RequestID())
}