Uses adafruit ultimate GPS module with PPS to provide an accurate NTP server.

Dependencies:   clock log mbed net time

Files at this revision

API Documentation at this revision

Comitter:
andrewboyson
Date:
Tue Nov 14 17:50:57 2017 +0000
Parent:
14:211a7a5aa6c9
Commit message:
Updated libraries

Changed in this revision

http-server/html-css.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-favicon.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-home.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-log.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-net.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-nmea.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-not-found.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-not-modified.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/html-system.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/page.cpp Show annotated file Show diff for this revision Revisions of this file
http-server/server-http.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
net.lib Show annotated file Show diff for this revision Revisions of this file
--- a/http-server/html-css.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-css.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,23 +1,22 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include  "css.h"
 
 void HtmlCss()
 {
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                      "Content-Type: text/css; charset=UTF-8\r\n"
                      "Connection: close\r\n"
                      "Cache-Control: max-age=3600\r\n"
                      "Date: ");
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
-    HttpReplyAddText("\r\n"
+    HttpAddText(pDate);
+    HttpAddText("\r\n"
                      "Last-Modified: ");   
     HttpDateFromDateTime(CssDate, CssTime, pDate);
-    HttpReplyAddText(pDate);
-    HttpReplyAddText("\r\n"
+    HttpAddText(pDate);
+    HttpAddText("\r\n"
                      "\r\n");
-    HttpReplyAddText(Css);
+    HttpAddText(Css);
 }
--- a/http-server/html-favicon.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-favicon.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,23 +1,22 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "favicon.h"
 
 void HtmlFavicon()
 {
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                      "Content-Type: image/x-icon\r\n"
                      "Connection: close\r\n"
                      "Cache-Control: max-age=3600\r\n"
                      "Date: ");
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
-    HttpReplyAddText("\r\n"
+    HttpAddText(pDate);
+    HttpAddText("\r\n"
                      "Last-Modified: ");   
     HttpDateFromDateTime(FaviconDate, FaviconTime, pDate);
-    HttpReplyAddText(pDate);
-    HttpReplyAddText("\r\n"
+    HttpAddText(pDate);
+    HttpAddText("\r\n"
                      "\r\n");
-    HttpReplyAddData(Favicon, FaviconSize);
+    HttpAddData(Favicon, FaviconSize);
 }
--- a/http-server/html-home.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-home.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,13 +1,12 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "page.h"
 #include "clock.h"
 #include "io.h"
 
 void HtmlHome()
 {
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                     "Content-Type: text/html; charset=UTF-8\r\n"
                     "Connection: close\r\n"
                     "Cache-control: no-cache\r\n"
@@ -15,9 +14,9 @@
                         
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
+    HttpAddText(pDate);
  
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                     "\r\n"
                     "<html>\r\n"
                     "<head>\r\n"
@@ -30,13 +29,13 @@
 
     PageAddNav(HOME_PAGE);
     
-    HttpReplyAddText("<h1>Time</h1>\r\n");
+    HttpAddText("<h1>Time</h1>\r\n");
     struct tm tm;
     ClockTmLocal(&tm);
-    HttpReplyAddText("<div>\r\n");
+    HttpAddText("<div>\r\n");
     PageAddTm(&tm);
-    HttpReplyAddText("</div>\r\n");
+    HttpAddText("</div>\r\n");
     
-    HttpReplyAddText("</body>\r\n"
+    HttpAddText("</body>\r\n"
                      "</html>\r\n");
 }
--- a/http-server/html-log.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-log.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,12 +1,11 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "page.h"
 #include  "log.h"
 
 void HtmlLog()
 {
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                      "Content-Type: text/html; charset=UTF-8\r\n"
                      "Connection: close\r\n"
                      "Cache-Control: no-cache\r\n"
@@ -14,9 +13,9 @@
     
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
+    HttpAddText(pDate);
     
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "\r\n"
                      "<html>\r\n"
                      "<head>\r\n"
@@ -29,13 +28,13 @@
 
     PageAddNav(LOG_PAGE);
     
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "<h1>GPS Clock - Log</h1>\r\n"
                      "<h2>Log</h2>\r\n"
                      "<code>");
-    HttpReplyAddStream(LogEnumerateStart, LogEnumerate);
+    HttpAddStream(LogEnumerateStart, LogEnumerate);
 
-    HttpReplyAddText("</code>\r\n"
+    HttpAddText("</code>\r\n"
                      "</body>\r\n"
                      "</html>\r\n");
 
--- a/http-server/html-net.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-net.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,26 +1,27 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "page.h"
 #include  "net.h"
-#include  "ip6.h"
-#include   "ar.h"
-#include   "nr.h"
+#include  "ip6addr.h"
+#include  "ar4.h"
+#include  "ar6.h"
+#include  "nr4.h"
+#include  "nr6.h"
 #include  "ndp.h"
 
 void HtmlNet()
 {
     char text[2000];
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                      "Content-Type: text/html; charset=UTF-8\r\n"
                      "Connection: close\r\n"
                      "Cache-control: no-cache\r\n"
                      "Date: ");
                         
     HttpDateFromNow(text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
  
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "\r\n"
                      "<html>\r\n"
                      "<head>\r\n"
@@ -33,24 +34,24 @@
 
     PageAddNav(NET_PAGE);
     
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "<h1>GPS Clock - Net</h1>\r\n"
                      "<h2>NDP</h2>\r\n"
                      "<p>Prefix ");
     
     Ip6AddressToString(NdpPrefix, sizeof(text), text);
-    HttpReplyAddText(text);
-    HttpReplyAddText("</p>\r\n"
+    HttpAddText(text);
+    HttpAddText("</p>\r\n"
                      "<p>DNS server ");
     
     Ip6AddressToString(NdpDnsServer, sizeof(text), text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
                         
-    HttpReplyAddText("<h2>ARP 4</h2>\r\n<code>"); ArSendHttp4(); HttpReplyAddText("</code>\r\n");
-    HttpReplyAddText("<h2>DNS 4</h2>\r\n<code>"); NrSendHttp4(); HttpReplyAddText("</code>\r\n");
-    HttpReplyAddText("<h2>ARP 6</h2>\r\n<code>"); ArSendHttp6(); HttpReplyAddText("</code>\r\n");
-    HttpReplyAddText("<h2>DNS 6</h2>\r\n<code>"); NrSendHttp6(); HttpReplyAddText("</code>\r\n");
+    HttpAddText("<h2>ARP 4</h2>\r\n<code>"); Ar4SendHttp(); HttpAddText("</code>\r\n");
+    HttpAddText("<h2>DNS 4</h2>\r\n<code>"); Nr4SendHttp(); HttpAddText("</code>\r\n");
+    HttpAddText("<h2>ARP 6</h2>\r\n<code>"); Ar6SendHttp(); HttpAddText("</code>\r\n");
+    HttpAddText("<h2>DNS 6</h2>\r\n<code>"); Nr6SendHttp(); HttpAddText("</code>\r\n");
     
-    HttpReplyAddText("</body>\r\n"
+    HttpAddText("</body>\r\n"
                      "</html>\r\n");
 }
--- a/http-server/html-nmea.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-nmea.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,6 +1,5 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "page.h"
 #include "clock.h"
 #include "io.h"
@@ -12,7 +11,7 @@
     
     char text[400];
     
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                     "Content-Type: text/html; charset=UTF-8\r\n"
                     "Connection: close\r\n"
                     "Cache-control: no-cache\r\n"
@@ -20,9 +19,9 @@
                         
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
+    HttpAddText(pDate);
  
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                     "\r\n"
                     "<html>\r\n"
                     "<head>\r\n"
@@ -36,47 +35,47 @@
     PageAddNav(NMEA_PAGE);
     
     
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "<h1>GPS Clock - NMEA</h1>\r\n"
                      "<h2>Position</h2>\r\n"
                      "<p>WGS ");
     
     
     NmeaDegToString('N', 'S', NmeaLatAv, text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     NmeaDegToString('E', 'W', NmeaLngAv, text);
-    HttpReplyAddText(text);
-    HttpReplyAddText("H");
+    HttpAddText(text);
+    HttpAddText("H");
     NmeaHgtToString(NmeaHgtAv, text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     
-    HttpReplyAddText("</p>\r\n"
+    HttpAddText("</p>\r\n"
                      "<p>Height above MSL m ");
     
     NmeaHgtToString(NmeaHeightDevAboveMslAv, text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     
-    HttpReplyAddText("</p>\r\n"
+    HttpAddText("</p>\r\n"
                      "<p>Satellite count ");
     
     sprintf(text, "%d", NmeaSatelliteCount);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     
-    HttpReplyAddText("</p>\r\n"
+    HttpAddText("</p>\r\n"
                      "<p>Dilution of Precision ");
     
     NmeaDopToString(NmeaDop, text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
 
     
-    HttpReplyAddText("</p>\r\n"
+    HttpAddText("</p>\r\n"
                      "<h2>ZDA timing bins</h2>\r\n"
                      "<code>");
                         
     GpsBucketsAsString(400, text);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     
-    HttpReplyAddText("</code>\r\n"
+    HttpAddText("</code>\r\n"
                      "</body>\r\n"
                      "</html>\r\n");
 }
--- a/http-server/html-not-found.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-not-found.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,8 +1,8 @@
 #include "mbed.h"
-#include "http-reply.h"
+#include "http.h"
 
 void HtmlNotFound()
 {
-    HttpReplyAddText("HTTP/1.1 404 Not Found\r\n"
+    HttpAddText("HTTP/1.1 404 Not Found\r\n"
                     "\r\n");
 }
--- a/http-server/html-not-modified.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-not-modified.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,14 +1,13 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 
 void HtmlNotModified()
 {
-    HttpReplyAddText("HTTP/1.1 304 Not Modified\r\n"
+    HttpAddText("HTTP/1.1 304 Not Modified\r\n"
                      "Date: ");
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
-    HttpReplyAddText("\r\n"
+    HttpAddText(pDate);
+    HttpAddText("\r\n"
                      "\r\n");
 }
--- a/http-server/html-system.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/html-system.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,6 +1,5 @@
 #include "mbed.h"
 #include "http.h"
-#include "http-reply.h"
 #include "page.h"
 #include "clock.h"
 #include "rtc.h"
@@ -12,7 +11,7 @@
 
 void HtmlSystem()
 {
-    HttpReplyAddText("HTTP/1.1 200 OK\r\n"
+    HttpAddText("HTTP/1.1 200 OK\r\n"
                      "Content-Type: text/html; charset=UTF-8\r\n"
                      "Connection: close\r\n"
                      "Cache-control: no-cache\r\n"
@@ -20,9 +19,9 @@
                         
     char pDate[HTTP_DATE_LENGTH];
     HttpDateFromNow(pDate);
-    HttpReplyAddText(pDate);
+    HttpAddText(pDate);
  
-    HttpReplyAddText("\r\n"
+    HttpAddText("\r\n"
                      "\r\n"
                      "<html>\r\n"
                      "<head>\r\n"
@@ -35,34 +34,34 @@
 
     PageAddNav(SYSTEM_PAGE);
 
-    HttpReplyAddText("<h1>Time</h1>\r\n");
-    if (!  RtcIsSet()) HttpReplyAddText("<div>RTC   is not set!</div>\r\n");
-    if (!ClockIsSet()) HttpReplyAddText("<div>Clock is not set!</div>\r\n");
+    HttpAddText("<h1>Time</h1>\r\n");
+    if (!  RtcIsSet()) HttpAddText("<div>RTC   is not set!</div>\r\n");
+    if (!ClockIsSet()) HttpAddText("<div>Clock is not set!</div>\r\n");
     struct tm tm;
     ClockTmUtc(&tm);
-    HttpReplyAddText("<div>\r\n");
+    HttpAddText("<div>\r\n");
     PageAddTm(&tm);
-    HttpReplyAddText("</div>\r\n");
+    HttpAddText("</div>\r\n");
     ClockTmLocal(&tm);
-    HttpReplyAddText("<div>\r\n");
+    HttpAddText("<div>\r\n");
     PageAddTm(&tm);
-    HttpReplyAddText("</div>\r\n");
+    HttpAddText("</div>\r\n");
     PageAddLabelledInt("Freq ppb", 6, TickGetPpb());
         
-    HttpReplyAddText("<h1>Scan times</h1>\r\n");
+    HttpAddText("<h1>Scan times</h1>\r\n");
     PageAddLabelledInt("Program &micro;s", 6, MainScanUs);
 
-    HttpReplyAddText("<h1>Last reset</h1>\r\n");
+    HttpAddText("<h1>Last reset</h1>\r\n");
     if (WatchdogFlag)
     {
         PageAddCheckInput("/system", "Watchdog bit", "watchdogflagoff", "clear it");
     }
     else
     {
-        HttpReplyAddText("<div>Normal</div>\r\n");
+        HttpAddText("<div>Normal</div>\r\n");
     }
     
-    HttpReplyAddText("</code>\r\n"
+    HttpAddText("</code>\r\n"
                      "</body>\r\n"
                      "</html>\r\n");
 }
--- a/http-server/page.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/page.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,42 +1,42 @@
 #include "mbed.h"
-#include "http-reply.h"
+#include "http.h"
 #include "page.h"
 
 static void addNavItem(bool highlight, char* href, char* title)
 {
     char *p;
-    HttpReplyAddText("<li ");
+    HttpAddText("<li ");
     if (highlight) p = "class='this'";
     else           p = "            ";
-    HttpReplyAddText(p);
-    HttpReplyAddText("><a href='");
-    HttpReplyAddText(href);
-    HttpReplyAddText("'>");
-    HttpReplyAddText(title);
-    HttpReplyAddText("</a></li>\r\n");
+    HttpAddText(p);
+    HttpAddText("><a href='");
+    HttpAddText(href);
+    HttpAddText("'>");
+    HttpAddText(title);
+    HttpAddText("</a></li>\r\n");
 
 }
 void PageAddNav(int page)
 {
-    HttpReplyAddText("<nav><ul>\r\n");
+    HttpAddText("<nav><ul>\r\n");
     addNavItem(page ==   HOME_PAGE, "/",        "Home");
     addNavItem(page == SYSTEM_PAGE, "/system",  "System");
     addNavItem(page ==    NET_PAGE, "/net",     "Net");
     addNavItem(page ==    LOG_PAGE, "/log",     "Log");
     addNavItem(page ==   NMEA_PAGE, "/nmea",    "Nmea");
-    HttpReplyAddText("</ul></nav>\r\n");
+    HttpAddText("</ul></nav>\r\n");
 }
 
 void PageAddLabelledValue(char* label, float labelwidth, char* value)
 {
     char text[100];
-    HttpReplyAddText("<div>");
+    HttpAddText("<div>");
     snprintf(text, sizeof(text), "<div style='width:%.1fem; display:inline-block;'>", labelwidth);
-    HttpReplyAddText(text);
-    HttpReplyAddText(label);
-    HttpReplyAddText("</div>");
-    HttpReplyAddText(value);
-    HttpReplyAddText("</div>\r\n");
+    HttpAddText(text);
+    HttpAddText(label);
+    HttpAddText("</div>");
+    HttpAddText(value);
+    HttpAddText("</div>\r\n");
 }
 void PageAddLabelledOnOff(char* label, float labelwidth, bool value)
 {
@@ -51,27 +51,27 @@
 }
 void PageAddFormStart(char* action)
 {
-    HttpReplyAddText("<form action='");
-    HttpReplyAddText(action);
-    HttpReplyAddText("' method='get'>\r\n");
+    HttpAddText("<form action='");
+    HttpAddText(action);
+    HttpAddText("' method='get'>\r\n");
 }
 void PageAddTextInput(float width, char* label, float labelwidth, char* name, float inputwidth, char* value)
 {
     char text[100];
     if (width < 0.01)
     {
-        HttpReplyAddText("<div>");
+        HttpAddText("<div>");
     }
     else
     {
         snprintf(text, sizeof(text), "<div style='width:%.1fem; display:inline-block;'>", width);
-        HttpReplyAddText(text);
+        HttpAddText(text);
     }
     snprintf(text, sizeof(text), "<div style='width:%.1fem; display:inline-block;'>%s</div>", labelwidth, label);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     snprintf(text, sizeof(text), "<input type='text' name='%s' style='width:%.1fem;' value='%s'>", name, inputwidth, value);
-    HttpReplyAddText(text);
-    HttpReplyAddText("</div>\r\n");
+    HttpAddText(text);
+    HttpAddText("</div>\r\n");
 }
 void PageAddIntInput(float width, char* label, float labelwidth, char* name, float inputwidth, int value)
 {
@@ -81,35 +81,35 @@
 }
 void PageAddFormEnd()
 {
-    HttpReplyAddText("<input type='submit' value='Set' style='display:none;'>\r\n</form>\r\n");
+    HttpAddText("<input type='submit' value='Set' style='display:none;'>\r\n</form>\r\n");
 }
 void PageAddCheckInput(char* action, char* label, char* name, char* button)
 {
-    HttpReplyAddText("<form action='");              HttpReplyAddText(action); HttpReplyAddText("' method='get'>\r\n");
-    HttpReplyAddText("<input type='hidden' name='"); HttpReplyAddText(name);   HttpReplyAddText("'>\r\n");
-    HttpReplyAddText(label); HttpReplyAddText("\r\n");
-    HttpReplyAddText("<input type='submit' value='"); HttpReplyAddText(button); HttpReplyAddText("'>\r\n");
-    HttpReplyAddText("</form>\r\n");
+    HttpAddText("<form action='");              HttpAddText(action); HttpAddText("' method='get'>\r\n");
+    HttpAddText("<input type='hidden' name='"); HttpAddText(name);   HttpAddText("'>\r\n");
+    HttpAddText(label); HttpAddText("\r\n");
+    HttpAddText("<input type='submit' value='"); HttpAddText(button); HttpAddText("'>\r\n");
+    HttpAddText("</form>\r\n");
 }
 void PageAddTm(struct tm* ptm)
 {
     char text[30];
     snprintf(text, sizeof(text), "%d-%02d-%02d ", ptm->tm_year + 1900, ptm->tm_mon + 1, ptm->tm_mday);
-    HttpReplyAddText(text);
+    HttpAddText(text);
     switch(ptm->tm_wday)
     {
-        case  0: HttpReplyAddText("Sun"); break;
-        case  1: HttpReplyAddText("Mon"); break;
-        case  2: HttpReplyAddText("Tue"); break;
-        case  3: HttpReplyAddText("Wed"); break;
-        case  4: HttpReplyAddText("Thu"); break;
-        case  5: HttpReplyAddText("Fri"); break;
-        case  6: HttpReplyAddText("Sat"); break;
-        default: HttpReplyAddText("???"); break;
+        case  0: HttpAddText("Sun"); break;
+        case  1: HttpAddText("Mon"); break;
+        case  2: HttpAddText("Tue"); break;
+        case  3: HttpAddText("Wed"); break;
+        case  4: HttpAddText("Thu"); break;
+        case  5: HttpAddText("Fri"); break;
+        case  6: HttpAddText("Sat"); break;
+        default: HttpAddText("???"); break;
     }
     snprintf(text, sizeof(text), " %02d:%02d:%02d", ptm->tm_hour, ptm->tm_min, ptm->tm_sec);
-    HttpReplyAddText(text);
-    if      (ptm->tm_isdst  > 0) HttpReplyAddText(" BST");
-    else if (ptm->tm_isdst == 0) HttpReplyAddText(" GMT");
-    else                         HttpReplyAddText(" UTC");
+    HttpAddText(text);
+    if      (ptm->tm_isdst  > 0) HttpAddText(" BST");
+    else if (ptm->tm_isdst == 0) HttpAddText(" GMT");
+    else                         HttpAddText(" UTC");
 }
--- a/http-server/server-http.cpp	Thu Oct 26 15:12:04 2017 +0000
+++ b/http-server/server-http.cpp	Tue Nov 14 17:50:57 2017 +0000
@@ -1,11 +1,9 @@
-#include     "mbed.h"
-#include     "html.h"
-#include  "favicon.h"
-#include      "css.h"
-#include "http.h"
-#include "http-request.h"
-#include "http-reply.h"
-#include "io.h"
+#include    "mbed.h"
+#include    "html.h"
+#include "favicon.h"
+#include     "css.h"
+#include    "http.h"
+#include      "io.h"
 
 #define DO_NOT_FOUND    0
 #define DO_NOT_MODIFIED 1
--- a/mbed.bld	Thu Oct 26 15:12:04 2017 +0000
+++ b/mbed.bld	Tue Nov 14 17:50:57 2017 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/mbed/builds/fb8e0ae1cceb
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e7ca05fa8600
\ No newline at end of file
--- a/net.lib	Thu Oct 26 15:12:04 2017 +0000
+++ b/net.lib	Tue Nov 14 17:50:57 2017 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/users/andrewboyson/code/net/#73af5c0b0dc2
+https://developer.mbed.org/users/andrewboyson/code/net/#35117a8b5c65