Skip to content

Commit

Permalink
Handle bad requests (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
joecorall committed May 18, 2024
1 parent 2485fb5 commit 3d9cf40
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion examples/libreoffice/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ COPY cmd.sh /app/
RUN apk update && \
apk add --no-cache \
openjdk17-jre==17.0.11_p9-r0 \
libreoffice==7.6.3.1-r0 \
libreoffice==7.6.7.2-r0 \
ttf-dejavu==2.37-r5
4 changes: 4 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ func MessageHandler(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusMethodNotAllowed)
return
}
if r.Header.Get("Apix-Ldp-Resource") == "" {
http.Error(w, "Bad request", http.StatusBadRequest)
return
}
defer r.Body.Close()

// Read the Alpaca message payload
Expand Down

0 comments on commit 3d9cf40

Please sign in to comment.