Replace QUIC with HTTP3/QUIC #43

Merged
nikooo777 merged 18 commits from http3 into master 2020-07-09 15:17:35 +02:00
Showing only changes of commit 34ca7847d0 - Show all commits

View file

@ -70,6 +70,10 @@ func (s *Server) Start(address string) error {
requestedBlob := vars["hash"]
blob, err := s.store.Get(requestedBlob)
if err != nil {
if errors.Is(err, store.ErrBlobNotFound) {
http.Error(w, err.Error(), http.StatusNotFound)
return
}
fmt.Printf("%s: %s", requestedBlob, errors.FullTrace(err))
s.logError(err)
http.Error(w, err.Error(), http.StatusBadRequest)