Click here to Skip to main content
15,881,882 members
Articles / Desktop Programming / MFC

STL WebServer

Rate me:
Please Sign up or sign in to vote.
4.89/5 (5 votes)
8 May 2000 89.9K   2.5K   47  
A set of classes written in STL that implement a web server
#if !defined(HttpStrings_H)
#define HttpStrings_H


#define	IDS_STATUS_OK           "200 OK"
#define	IDS_STATUS_CREATED      "201 Created"
#define	IDS_STATUS_ACCEPTED     "202 Accepted"
#define	IDS_STATUS_NOCONTENT    "204 No Content"
#define	IDS_STATUS_MOVEDPERM    "301 Moved Permanently"
#define	IDS_STATUS_MOVEDTEMP    "302 Redirection"
#define	IDS_STATUS_NOTMODIFIED  "304 Not Modified"
#define IDS_STATUS_BADREQUEST   "400 Bad Request"
#define	IDS_STATUS_UNAUTH       "401 Unauthorized"
#define	IDS_STATUS_FORBIDDEN    "403 Forbidden"
#define	IDS_STATUS_NOTFOUND     "404 Not Found"
#define	IDS_STATUS_SVRERROR     "500 Internal Server Error"
#define	IDS_STATUS_NOTIMPL      "501 Not Implemented"
#define	IDS_STATUS_BADGATEWAY   "502 Bad Gateway"
#define	IDS_STATUS_SVCUNAVAIL   "503 Service Unavailable"



#define	IDS_LONGTIME            "%a, %d %b %Y %H:%M:%S %z"
#define	IDS_TIMEFORMAT          "%m/%d/%y %H:%M:%S"
#define	IDS_OPTIONS             "Server Options"
#define	IDS_FILETIMEFMT         "%m/%d/%y %H:%M"
#define	IDS_HTTPTIME            "%a, %d %b %Y %H:%M:%S GMT"
#define	IDS_SERVER_NAME         "XServer/1.0"
#define	IDS_LOGFILEFMT          " Log %Y%m%d.hsl"
#define	IDS_STATUSFMT           " %03d  \t"
#define	IDS_DOCTITLE            "%s (http://%s:%d)"
#define	IDS_LOG_HEADER          "Hit Log for %s\n\n"
#define	IDS_LONG_DATE           "%A, %B %d, %Y"
#define	IDS_DOCTITLE_NOPORT     "%s (http://%s)"
#define	ID_INDICATOR_UPTIME     "Uptime: 999d 99h 99m"
#define	IDS_ERROR_NOTDIR        "The specified root folder is not a directory."
#define	IDS_ERROR_NOTTHERE      "The specified root folder does not exists."
#define	IDS_WINSOCK_FAILED      "Failed to load WinSock services!"

#define	IDS_BAD_ROOT            "The specified root directory either does not exists or is not a directory."
#define	IDS_DEFAULTDOC          "default.html\ndefault.htm\nindex.html\nindex.htm"
#define	IDS_DIRMASK             "*.*"
#define	IDS_DEFAULTAPP          "default.exe\ndefault.bat"
#define	IDS_DEF_ROOT            "WebPages"
#define	IDS_APP_CGI             "bat\nexe"
#define	IDS_APP_ISAPI           "dll"
#define	IDS_CANT_LISTEN         "Can't start server!"
#define	IDS_INVALID             "%s (Error! Not Listening!)"
#define	IDS_LISTEN_INUSE        "Port %d is already in use!\n\nMake sure there is no other applications or instances of HttpSvr running that are already bound to that port."
#define	IDS_LISTEN_ERROR        "Can't listen on port %d!\n\nMake sure the TCP/IP transport is set up correctly and that no other applications are already listening on that port."
#define	IDS_NOT_LISTENING       "Server not listening"
#define	IDS_CONTENTS_PRE        "<html><h1>"
#define	IDS_CONTENTS_POST       "</h1><p>\n"
#define	IDS_CONTENTS_HEADING    "<pre> Last Modified       Size %sName\n<hr>\n"
#define	IDS_CONTENTS_FORMAT     " %-15s %s <a href=""%s"">%s%-1s</a>\n"
#define	IDS_CONTENTS_DESC       "The URL specified is a folder that does not contain a default document or application. The following is a listing of what documents and subfolders it does have; please select one:<p>\n"
#define	IDS_CONTENTS_PARENT     "<hr><h3><a href=""."">%s Parent Folder</a></h3>\n"
#define	IDS_CONTENTS_EMPTY      "<strong>empty</strong>\n"
#define	IDS_CONTENTS_NOTE       "<hr><em>Do your part to beautify the web! Turn <strong>off</strong> link underlining!</em>\n"
#define	IDS_CONTENTS_FOOTER     "</pre>\n"
#define	IDS_ICON_BLANK          "<img src=""/SvrAdmin/Blank.gif"" align=bottom alt=""     "" border=0 width=16 height=16>"
#define	IDS_ICON_FILE           "<img src=""/SvrAdmin/File.gif"" align=bottom alt=""     "" border=0 width=16 height=16>"
#define	IDS_ICON_FOLDER         "<img src=""/SvrAdmin/Folder.gif"" align=bottom alt=""     "" border=0 width=16 height=16>"
#define	IDS_ICON_PARENT         "<img src=""/SvrAdmin/Prev.gif"" align=bottom alt=""     "" border=0 width=16 height=16>"
#define	IDS_UPTIME_START        "Uptime: 00h 00m"
#define	IDS_UPTIME_DAY          "Uptime: %Hh %Mm"
#define	IDS_UPTIME_DAYS         "Uptime: %Dd %Hh %Mm"


#endif

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions