Bug 1325876 Comment 21 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

I did further investigations and this is an issue that persists on other errors (e.g. `NS_ERROR_NET_ERROR_RESPONSE`)

This was reproducible on other error pages with:
1. Run this Python script.
```
http.server import HTTPServer, BaseHTTPRequestHandler

class TestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        self.send_response(500)
        self.send_header("Content-Length", 0)
        self.end_headers()

if __name__ == "__main__":
    server_address = ('', 8000)
    httpd = HTTPServer(server_address, TestHandler)
    httpd.serve_forever()
```
2. Build this patch and run `./mach run localhost:8000`

Expected: Back button is enabled.
Actual: Back button is not enabled.

I think we should create a separate bug to handle session history.
I did further investigations and this is an issue that persists on other errors (e.g. `NS_ERROR_NET_ERROR_RESPONSE`)

This was reproducible on other error pages with:
1. Run this Python script.
```
from http.server import HTTPServer, BaseHTTPRequestHandler

class TestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == '/test':
            self.send_response(500)
            self.send_header("Content-Length", "0")
            self.end_headers()
        else:
            self.send_response(200)
            self.send_header("Content-type", "text/html")
            self.end_headers()
            html_content = """
            <html>
            <head>
                <title>Test Page</title>
            </head>
            <body>
                <a href="/test">HTTP 500 and unusual content-type</a>
            </body>
            </html>
            """
            self.wfile.write(html_content.encode('utf-8'))

if __name__ == "__main__":
    server_address = ('', 8000)
    httpd = HTTPServer(server_address, TestHandler)
    httpd.serve_forever()
```
2. Build this patch and run `./mach run localhost:8000`

3. Navigate to "HTTP 500 and unusual content-type"

Expected: Back button is enabled.
Actual: Back button is not enabled.

I think we should create a separate bug to handle session history.
The second STR is due to this patch; I will fix it.
I did further investigations and the first STR is an issue that persists on other errors (e.g. `NS_ERROR_NET_ERROR_RESPONSE`)

This was reproducible on other error pages with:
1. Run this Python script.
```
from http.server import HTTPServer, BaseHTTPRequestHandler

class TestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == '/test':
            self.send_response(500)
            self.send_header("Content-Length", "0")
            self.end_headers()
        else:
            self.send_response(200)
            self.send_header("Content-type", "text/html")
            self.end_headers()
            html_content = """
            <html>
            <head>
                <title>Test Page</title>
            </head>
            <body>
                <a href="/test">HTTP 500 and unusual content-type</a>
            </body>
            </html>
            """
            self.wfile.write(html_content.encode('utf-8'))

if __name__ == "__main__":
    server_address = ('', 8000)
    httpd = HTTPServer(server_address, TestHandler)
    httpd.serve_forever()
```
2. Build this patch and run `./mach run localhost:8000`

3. Navigate to "HTTP 500 and unusual content-type"

Expected: Back button is enabled.
Actual: Back button is not enabled.

I think we should create a separate bug to handle session history.
Currently investigating the second STR.
I did further investigations and the first STR is an issue that persists on other errors (e.g. `NS_ERROR_NET_ERROR_RESPONSE`)

This was reproducible on other error pages with:
1. Run this Python script.
```
from http.server import HTTPServer, BaseHTTPRequestHandler

class TestHandler(BaseHTTPRequestHandler):
    def do_GET(self):
        if self.path == '/test':
            self.send_response(500)
            self.send_header("Content-Length", "0")
            self.end_headers()
        else:
            self.send_response(200)
            self.send_header("Content-type", "text/html")
            self.end_headers()
            html_content = """
            <html>
            <head>
                <title>Test Page</title>
            </head>
            <body>
                <a href="/test">HTTP 500 and unusual content-type</a>
            </body>
            </html>
            """
            self.wfile.write(html_content.encode('utf-8'))

if __name__ == "__main__":
    server_address = ('', 8000)
    httpd = HTTPServer(server_address, TestHandler)
    httpd.serve_forever()
```
2. Build this patch and run `./mach run localhost:8000`

3. Navigate to "HTTP 500 and unusual content-type"

Expected: Back button is enabled.
Actual: Back button is not enabled.

I think we should create a separate bug to handle session history.

Back to Bug 1325876 Comment 21