Possibly fix 304 issues as reported by milkytiptoe. #932
This commit is contained in:
parent
e0a4f20615
commit
86f5844a6b
@ -3425,7 +3425,7 @@
|
||||
return;
|
||||
}
|
||||
status = req.status;
|
||||
if (status !== 200) {
|
||||
if (status !== 200 && status !== 304) {
|
||||
if (url = Redirect.post(board, postID)) {
|
||||
$.cache(url, function() {
|
||||
return Get.archivedPost(this, board, postID, root, context);
|
||||
@ -4788,9 +4788,10 @@
|
||||
return post.nodes.comment = post.nodes.shortComment;
|
||||
},
|
||||
parse: function(req, a, post) {
|
||||
var clone, comment, href, postObj, posts, quote, spoilerRange, _i, _j, _len, _len1, _ref;
|
||||
if (req.status !== 200) {
|
||||
a.textContent = "Error " + req.statusText + " (" + req.status + ")";
|
||||
var clone, comment, href, postObj, posts, quote, spoilerRange, status, _i, _j, _len, _len1, _ref;
|
||||
status = req.status;
|
||||
if (status !== 200 && status !== 304) {
|
||||
a.textContent = "Error " + req.statusText + " (" + status + ")";
|
||||
return;
|
||||
}
|
||||
posts = JSON.parse(req.response).posts;
|
||||
@ -4933,12 +4934,13 @@
|
||||
}
|
||||
},
|
||||
parse: function(req, thread, a) {
|
||||
var link, node, nodes, post, posts, replies, reply, spoilerRange, _i, _len;
|
||||
var link, node, nodes, post, posts, replies, reply, spoilerRange, status, _i, _len;
|
||||
if (a.textContent[0] === '+') {
|
||||
return;
|
||||
}
|
||||
if (req.status !== 200) {
|
||||
a.textContent = "Error " + req.statusText + " (" + req.status + ")";
|
||||
status = req.status;
|
||||
if (status !== 200 && status !== 304) {
|
||||
a.textContent = "Error " + req.statusText + " (" + status + ")";
|
||||
$.off(a, 'click', ExpandThread.cb.toggle);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -16,7 +16,7 @@
|
||||
"grunt": "~0.4.0",
|
||||
"grunt-bump": "~0.0.0",
|
||||
"grunt-contrib-clean": "~0.4.0",
|
||||
"grunt-contrib-coffee": "~0.4.0",
|
||||
"grunt-contrib-coffee": "~0.5.0",
|
||||
"grunt-contrib-concat": "~0.1.0",
|
||||
"grunt-contrib-watch": "~0.3.0",
|
||||
"grunt-exec": "~0.4.0"
|
||||
|
||||
@ -2138,7 +2138,7 @@ Get =
|
||||
return
|
||||
|
||||
{status} = req
|
||||
if status isnt 200
|
||||
if status not in [200, 304]
|
||||
# The thread can die by the time we check a quote.
|
||||
if url = Redirect.post board, postID
|
||||
$.cache url, ->
|
||||
@ -3180,8 +3180,9 @@ ExpandComment =
|
||||
$.replace post.nodes.longComment, post.nodes.shortComment
|
||||
post.nodes.comment = post.nodes.shortComment
|
||||
parse: (req, a, post) ->
|
||||
if req.status isnt 200
|
||||
a.textContent = "Error #{req.statusText} (#{req.status})"
|
||||
{status} = req
|
||||
if status not in [200, 304]
|
||||
a.textContent = "Error #{req.statusText} (#{status})"
|
||||
return
|
||||
|
||||
posts = JSON.parse(req.response).posts
|
||||
@ -3279,9 +3280,9 @@ ExpandThread =
|
||||
|
||||
parse: (req, thread, a) ->
|
||||
return if a.textContent[0] is '+'
|
||||
|
||||
if req.status isnt 200
|
||||
a.textContent = "Error #{req.statusText} (#{req.status})"
|
||||
{status} = req
|
||||
if status not in [200, 304]
|
||||
a.textContent = "Error #{req.statusText} (#{status})"
|
||||
$.off a, 'click', ExpandThread.cb.toggle
|
||||
return
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user