diff --git a/src/gmni.c b/src/gmni.c
index f3015ac679eba77397fb4aac5068f3a63e1cdbab..ff6c619f7c6cde57faa7398d4201d2cf867bf05a 100644
--- a/src/gmni.c
+++ b/src/gmni.c
@@ -290,6 +290,10 @@ exit = true;
goto next;
}
+ if (header_mode != OMIT_HEADERS) {
+ printf("%d %s\n", resp.status, resp.meta);
+ }
+
switch (gemini_response_class(resp.status)) {
case GEMINI_STATUS_CLASS_INPUT:
if (input_mode == INPUT_SUPPRESS) {
@@ -351,14 +355,7 @@ exit = true;
break;
}
- switch (header_mode) {
- case ONLY_HEADERS:
- printf("%d %s\n", resp.status, resp.meta);
- break;
- case SHOW_HEADERS:
- printf("%d %s\n", resp.status, resp.meta);
- /* fallthrough */
- case OMIT_HEADERS:
+ if (header_mode != ONLY_HEADERS) {
if (gemini_response_class(resp.status) !=
GEMINI_STATUS_CLASS_SUCCESS) {
break;