Review main Merged

1245[BUGFIX] Send header Error 404 in case of page not found errors

Steffen Gebert CR +2 V +2 Easy +15 −6 updated 06/03/13, 20:49

Commit message

If a page is not found, status 404 has to be sent.

Due to a recent change, an Exception is thrown instead of exiting.
As the Exception Handler overwrites the status 404 with a 503, this
code was sent to the client.

Review

  • Code review CR +2
    • Susi Moog +2
  • Verified V +2
    • Susi Moog +2

Issues 1

Files 1

Review log 29

Show 4 earlier messages
  1. Steffen Kamper commented on patch set 2 1 comment 03/30/11, 12:56

    Verified; Looks good to me, but someone else must approve
  2. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    (1 inline comment)

    class.tslib_fe.php:1032

    please use exit() instead of just exit
  3. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    (1 inline comment) well the manual also states "... this function prints ..." but I don't care too much,it's just that I like exit() more than just exit
  4. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    (1 inline comment) just a minor nitpick
  1. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    Looks good to me, but someone else must approve
  2. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    I would prefer that you didn't submit this OK, this one should not be submitted then
  3. Helmut Hummel commented on patch set 2 03/30/11, 12:56

    you need to resubmit a new patchset then
  4. Steffen Gebert commented on patch set 2 03/30/11, 12:56

    Sorry, I've pushed the change for 4-5 by mistake without removing the Change-Id. Thus Patch Set 1 is the correct one, PS2 is for 4-5! I'm currently figuring out, how to reupload it.

    class.tslib_fe.php:1032 Reply

    I disagree. As php.net states it is a language construct, not a function. Besides the personal taste, we also use exit; mostly in the code (at least the places I just found after short research).

    class.tslib_fe.php:1476 Reply

    No, the 404 results in a Server Error, thus 500 is correct.
  5. Steffen Gebert commented on patch set 2 03/30/11, 12:56

    (1 inline comment)
  6. Steffen Gebert commented on patch set 2 03/30/11, 12:56

    I've posted to the Gerrit mailing list, how to get rid of the change set. http://groups.google.com/group/repo-discuss/browse_thread/thread/c89b48a8fdd19f1b Please wait with submitting until I've managed to do so.
  7. Steffen Gebert uploaded patch set 2 03/30/11, 12:56

  8. Steffen Gebert commented on patch set 2 03/30/11, 12:56

    Do not submit
  9. Steffen Gebert uploaded patch set 3 03/30/11, 12:56

  10. Steffen Gebert commented on patch set 3 03/30/11, 12:56

    No score Re-uploaded v1 as v3. The commit has to be amended, then it can be pushed again.
  11. Steffen Gebert uploaded patch set 4 03/30/11, 12:56

  12. Steffen Gebert commented on patch set 4 03/30/11, 12:56

    Updated version, which fixes one forgotten place.
  13. Peter Beernink commented on patch set 5 03/30/11, 12:56

    Verified; Looks good to me, but someone else must approve
  14. Björn Pedersen commented on patch set 5 03/30/11, 12:56

    Looks good to me, but someone else must approve
  15. Susi Moog uploaded patch set 6 03/30/11, 12:56

  16. Susi Moog commented on patch set 6 03/30/11, 12:56

    Verified; Looks good to me, but someone else must approve
  17. Steffen Kamper commented on patch set 5 1 comment 03/30/11, 12:56

    I would prefer that you didn't submit this See comment, another place. I also would like to have a new function handling this instead of duplicate code always. Also the pageNotFound hanlde should be called in all places!
  18. Steffen Kamper commented on patch set 5 03/30/11, 12:56

    Looks good to me, but someone else must approve
  19. Steffen Gebert commented on patch set 5 03/30/11, 12:56

    (1 inline comment) It's not that much duplicated code. For 4-6 I'm thinking of creating an Exception hierarchy (e.g. HttpStatusExceptionInterface which can symbolize that the ErrorHandler must not send his header. then we could just throw HttpFileNotFound or HttpAccessDenied Exceptions).
  20. Steffen Gebert uploaded patch set 5 03/30/11, 12:56

  21. Mr. Jenkins commented on patch set 4 03/30/11, 12:56

  22. Mr. Jenkins commented on patch set 5 03/30/11, 12:56

  23. Mr. Jenkins commented on patch set 6 03/30/11, 12:56

  24. Susi Moog commented on patch set 6 V 0 03/30/11, 12:56

    by team member; Looks good to me, approved
  25. Susi Moog merged patch set 6 03/30/11, 12:56