Merge lp:~gary/launchpad/bug_475371 into lp:launchpad/db-devel

Proposed by Gary Poster on 2010-01-25
Status: Merged
Merged at revision: not available
Proposed branch: lp:~gary/launchpad/bug_475371
Merge into: lp:launchpad/db-devel
Diff against target: 36 lines (+32/-0)
1 file modified
lib/canonical/launchpad/offline-haproxy.html (+32/-0)
To merge this branch: bzr merge lp:~gary/launchpad/bug_475371
Reviewer Review Type Date Requested Status
Tom Haddon 2010-01-25 Approve on 2010-01-26
Leonard Richardson (community) 2010-01-25 Approve on 2010-01-25
Review via email: mp+18039@code.launchpad.net
To post a comment you must log in.
Gary Poster (gary) wrote :

This simply adds a file that should be usable by haproxy for being offline, per Tom Haddon's notes in bug 475371. Particularly, the file contains the necessary HTTP headers and has \r\n endings.

This is an RC-candidate.

Leonard Richardson (leonardr) wrote :

I see a size of 1189, not 1065. Is it necessary to specify Content-Length? It seems to be causing nothing but trouble, and it doesn't _look_ to be required by Haproxy.

Good that you got rid of the CSS reference. Approved pending removing Content-Length or fixing it and justifying its existence.

review: Approve
Gary Poster (gary) wrote :

Thanks, Leonard. I see the mistake I made: I was not including the DOCTYPE. I did len(c.split('\r\n',5)[-1]) instead of len(c.split('\r\n',4)[-1]). But now I get 1188, not 1189. I think I will follow your advice and remove it, and see if the LOSAs say that will work.

Tom Haddon (mthaddon) wrote :

I've tested this and it works fine, so from my perspective, +1.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'lib/canonical/launchpad/offline-haproxy.html'
2--- lib/canonical/launchpad/offline-haproxy.html 1970-01-01 00:00:00 +0000
3+++ lib/canonical/launchpad/offline-haproxy.html 2010-01-25 22:37:12 +0000
4@@ -0,0 +1,32 @@
5+HTTP/1.1 503 Service Unavailable
6+Content-Type: text/html
7+
8+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
9+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
10+ <head>
11+ <title>Please try again</title>
12+ <style type="text/css" media="screen, print">
13+ .offline{text-align:center;margin:2em 0}
14+ </style>
15+ </head>
16+ <body>
17+ <div class="offline">
18+ <!-- Before editing, please see
19+ https://bugs.launchpad.net/bugs/475371, especially comment #2,
20+ for details on this file. In particular, please maintain the
21+ \r\n line endings, at least for the HTTP header lines. -->
22+ <h1>Please try again</h1>
23+ <p>
24+ Sorry, there was a problem connecting to the Launchpad server.
25+ </p>
26+ <p>
27+ Try reloading this page in a minute or two.
28+ If the problem persists, let us know in
29+ <a href="irc://chat.freenode.net/#launchpad"
30+ >the #launchpad IRC channel on Freenode</a>.
31+ </p>
32+ <p>Thanks for your patience.</p>
33+
34+ </div>
35+ </body>
36+</html>

Subscribers

People subscribed via source and target branches

to status/vote changes: