Don't handle non-existent API handlers correctly for POST and DEL in mozhttpd

RESOLVED FIXED

Status

Testing
Mozbase
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: wlach, Assigned: wlach)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We should just 404 these cases, and not fall through the base http server handler (which doesn't know how to deal with these cases).
Summary: Don't handle non-existent API handlers correctly for POST and DEL → Don't handle non-existent API handlers correctly for POST and DEL in mozhttpd
Created attachment 589237 [details] [diff] [review]
Patch to not fall through to base http server, plus tests which demonstrate problem
Assignee: nobody → wlachance
Attachment #589237 - Flags: review?(jhammel)

Comment 2

6 years ago
Comment on attachment 589237 [details] [diff] [review]
Patch to not fall through to base http server, plus tests which demonstrate problem

looks good
Attachment #589237 - Flags: review?(jhammel) → review+
I added the following comments to the do_POST and do_DEL methods, just to make it clear that what we're doing may not be 100% technically correct.

# if we don't have a match, we always fall through to 404 (this may
# not be "technically" correct if we have a local file at the same
# path as the resource but... meh)
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.