Skip to content

Commit

Permalink
Merge pull request #1286 from rich-coe/bug.1285
Browse files Browse the repository at this point in the history
Check for 304 status before 0 length data #1285
  • Loading branch information
lwindolf authored Aug 14, 2023
2 parents 012d2a2 + 409c27c commit 39cf0f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/subscription.c
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,10 @@ subscription_process_update_result (const struct updateResult * const result, gp
}

/* consider everything that prevents processing the data we got */
if (result->httpstatus >= 400 || !result->data) {
if (304 == result->httpstatus) {
node->available = TRUE;
statusbar = g_strdup_printf (_("\"%s\" has not changed since last update"), node_get_title(node));
} else if (result->httpstatus >= 400 || !result->data) {
/* Default */
subscription->error = FETCH_ERROR_NET;
node->available = FALSE;
Expand All @@ -203,9 +206,6 @@ subscription_process_update_result (const struct updateResult * const result, gp
subscription_set_discontinued (subscription, TRUE);
statusbar = g_strdup_printf (_("\"%s\" is discontinued. Liferea won't updated it anymore!"), node_get_title (node));
}
} else if (304 == result->httpstatus) {
node->available = TRUE;
statusbar = g_strdup_printf (_("\"%s\" has not changed since last update"), node_get_title(node));
} else if (result->filterErrors) {
node->available = FALSE;
subscription->error = FETCH_ERROR_NET;
Expand Down

0 comments on commit 39cf0f8

Please sign in to comment.