trylink: produce even more info about final link stage
[oweals/busybox.git] / networking / httpd.c
index 2f76828c62741c7a8910d4937d32831296e1c92e..b083d645ca6f02d5807f50cade5135a3f8f8d517 100644 (file)
@@ -98,8 +98,8 @@
 # define PIPE_BUF 4096
 #endif
 
-static const char default_path_httpd_conf[] = "/etc";
-static const char httpd_conf[] = "httpd.conf";
+static const char default_path_httpd_conf[] ALIGN1 = "/etc";
+static const char httpd_conf[] ALIGN1 = "httpd.conf";
 
 #define TIMEOUT 60
 
@@ -202,9 +202,9 @@ struct globals {
        ContentLength = -1; \
 } while (0)
 
-static const char request_GET[] = "GET";    /* size algorithmic optimize */
+static const char request_GET[] ALIGN1 = "GET";    /* size algorithmic optimize */
 
-static const char* const suffixTable [] = {
+static const char *const suffixTable[] = {
 /* Warning: shorted equivalent suffix in one line must be first */
        ".htm.html", "text/html",
        ".jpg.jpeg", "image/jpeg",
@@ -288,7 +288,7 @@ static const HttpEnumString httpResponseNames[] = {
 };
 
 
-static const char RFC1123FMT[] = "%a, %d %b %Y %H:%M:%S GMT";
+static const char RFC1123FMT[] ALIGN1 = "%a, %d %b %Y %H:%M:%S GMT";
 
 
 #define STRNCASECMP(a, str) strncasecmp((a), (str), sizeof(str)-1)
@@ -1268,7 +1268,7 @@ static int sendCgi(const char *url,
                                 * <cr><lf> pair here. We will output "200 OK" line
                                 * if needed, but CGI still has to provide blank line
                                 * between header and body */
-                               static const char HTTP_200[] = "HTTP/1.0 200 OK\r\n";
+                               static const char HTTP_200[] ALIGN1 = "HTTP/1.0 200 OK\r\n";
 
                                /* Must use safe_read, not full_read, because
                                 * CGI may output a few first bytes and then wait
@@ -1287,15 +1287,13 @@ static int sendCgi(const char *url,
                                buf_count += count;
                                count = 0;
                                /* "Status" header format is: "Status: 302 Redirected\r\n" */
-                               if (buf_count >= 8) {
-                                       if (memcmp(rbuf, "Status: ", 8) == 0) {
-                                               /* send "HTTP/1.0 " */
-                                               if (full_write(s, HTTP_200, 9) != 9)
-                                                       break;
-                                               rbuf += 8; /* skip "Status: " */
-                                               count -= 8;
-                                               buf_count = -1; /* buffering off */
-                                       }
+                               if (buf_count >= 8 && memcmp(rbuf, "Status: ", 8) == 0) {
+                                       /* send "HTTP/1.0 " */
+                                       if (full_write(s, HTTP_200, 9) != 9)
+                                               break;
+                                       rbuf += 8; /* skip "Status: " */
+                                       count = buf_count - 8;
+                                       buf_count = -1; /* buffering off */
                                } else if (buf_count >= 4) {
                                        /* Did CGI add "HTTP"? */
                                        if (memcmp(rbuf, HTTP_200, 4) != 0) {
@@ -1345,9 +1343,9 @@ static int sendCgi(const char *url,
 static int sendFile(const char *url)
 {
        char * suffix;
-       int  f;
-       const char * const * table;
-       const char * try_suffix;
+       int f;
+       const char *const *table;
+       const char *try_suffix;
 
        suffix = strrchr(url, '.');