Incorrect/mismatched HTTP 404 response

RESOLVED FIXED

Status

www.mozilla.org
Legacy PHP system
P3
normal
RESOLVED FIXED
5 years ago
4 years ago

People

(Reporter: jpetto, Assigned: kohei)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [kb=989415] b=trunk r=117969, URL)

(Reporter)

Description

5 years ago
HTTP status code 200 OK is being returned for non-existant /about/partnerships/ URLs. However, the status is set to 404 Not Found, and 404 page is being returned.

Sample outputs:

** Non-existant /about/partnerships/ URL **

curl -I https://www.allizom.org/en-US/about/partnerships/foo/
HTTP/1.1 200 OK
Server: Apache
X-Backend-Server: bedrock1.stage.webapp.scl3.mozilla.com
Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, private, max-age=900
Content-Type: text/html; charset=UTF-8
Date: Wed, 29 May 2013 16:58:50 GMT
Status: 404 Not Found

Notice the conflicting responses - HTTP/1.1 200 OK and 404 Not Found.

** Non-existant /about/ URL **

curl -I https://www.allizom.org/en-US/about/foo/
HTTP/1.1 404 Not Found
Server: Apache
X-Backend-Server: bedrock1.stage.webapp.scl3.mozilla.com
Vary: Accept-Encoding
Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, private
Content-Type: text/html; charset=UTF-8
Date: Wed, 29 May 2013 16:59:12 GMT
Status: 404 Not Found

** Existing URL **

curl -I https://www.allizom.org/en-US/about/partnerships/
HTTP/1.1 200 OK
Server: Apache
Vary: Cookie, Accept-Encoding
X-Backend-Server: bedrock1.stage.webapp.scl3.mozilla.com
Cache-Control: max-age=600
Content-Type: text/html; charset=utf-8
Date: Wed, 29 May 2013 16:58:58 GMT
Expires: Wed, 29 May 2013 17:08:59 GMT

This came to a head when adding an AJAX request to a missing URL. AJAX sees the 200 OK response and fires its success handler. Should see a 404 and fire the error handler.
Added to kanbanery backlog.
Priority: -- → P3
(Assignee)

Comment 2

5 years ago
These pages also return the 200 code:
https://www.mozilla.org/en-US/about/contact/foo/
https://www.mozilla.org/en-US/about/legal/foo/
https://www.mozilla.org/en-US/firefox/search/foo/

A common point? The PHP side has corresponding pages:
https://www.mozilla.org/en-US/about/contact.html
https://www.mozilla.org/en-US/about/legal.html
https://www.mozilla.org/en-US/firefox/search.html
Summary: Incorrect/mismatched HTTP 404 response (/about/partnerships/ URLs only?) → Incorrect/mismatched HTTP 404 response
moving to icebox
(Assignee)

Comment 4

5 years ago
Fixed on trunk at r117969. It works as expected on my local server.
Assignee: nobody → kohei.yoshino.bugs
Status: NEW → ASSIGNED
Keywords: qawanted
OS: Mac OS X → All
Hardware: x86 → All
Whiteboard: b=trunk r=117969
(Assignee)

Comment 5

5 years ago
As per Bug 889776 Comment 7, retornam has tested this on trunk.

So can someone merge r117969 to stage/prod?
Status: ASSIGNED → RESOLVED
Last Resolved: 5 years ago
Keywords: qawanted
Resolution: --- → FIXED
(Assignee)

Updated

5 years ago
Component: General → Legacy PHP system
(Assignee)

Comment 6

5 years ago
sancus: Please merge r117969 to stage/prod. Thanks!
Flags: needinfo?(sancus)
(Assignee)

Comment 7

4 years ago
It still needs to be merged. sancus or someone?
Whiteboard: b=trunk r=117969 → [kb=989415] b=trunk r=117969
Merged to prod in r122406.
Flags: needinfo?(sancus)
You need to log in before you can comment on or make changes to this bug.