452
you are viewing a single comment's thread
view the rest of the comments
[-] Lifter@discuss.tchncs.de 1 points 16 hours ago

But if there is no resource, how can the system know whether they are authorized? 403 it is.

[-] Pika@sh.itjust.works 2 points 7 hours ago* (last edited 7 hours ago)

Whether you respond as a 404 or a 403 would be dependent on whether or not the user who is logged in has the authorization to read the previous directory.

A site administrator, for example, would have the authority to read the previous directory, which means that the site administrator would know whether or not the resource existed or not(as the previous directory would list it) so in which case a 404 would be proper. However, a user who doesn't have authority to read the previous directory should not have the ability to know whether or not it exists. so a 404 would not be proper here because the proper one would be a 403 because it's inherited from the previous directory.

edit: changed traverse to read, as traversal doesn't mean you can see what else is there.

this post was submitted on 10 Apr 2026
452 points (90.9% liked)

Programmer Humor

30899 readers
1189 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS