2 Revision 211.15 2000/04/20 02:42:23 ajc
3 * tcp_sockets.c: changed memcpy() to memset() in tcp_connectsock; this was
4 crashing every session, every time. (?)
5 * End the session after displaying robots.txt or nocookies.html, to prevent
6 big session logjams when either of these conditions are met
8 Revision 211.14 2000/04/15 15:43:46 nbryant
9 * warning fix for 64-bit compile on ultrasparc. (kids don't try this at home,
10 64-bit gcc on sparc is evil)
12 Revision 211.13 2000/04/06 20:42:03 nbryant
13 * configure.in: fix a typo
15 Revision 211.12 2000/04/06 20:37:01 nbryant
16 * solaris cleanups and warning fixes
18 Revision 211.11 2000/03/31 03:48:52 ajc
19 * text_to_server() now behaves the way web users expect text entry to work.
20 Soft linebreaks are soft, hard linebreaks are hard. No indentation.
22 Revision 211.10 2000/03/31 02:39:06 ajc
23 * Fixed bugs in "Site configuration" and added new fields.
25 Revision 211.9 2000/03/31 02:08:45 ajc
26 * Added "max messages per page" and "read next nnn" stuff to read loop
27 (probably not in its final form)
29 Revision 211.8 2000/03/28 17:02:47 nbryant
30 * configure.in: check for -lsocket -lnsl on Solaris and other SVR4-alikes
32 Revision 211.7 2000/03/27 16:18:17 ajc
33 * Implement multi-room chat as available in Citadel 5.70
35 Revision 211.6 2000/03/23 04:45:15 ajc
36 * Experimental move of wholist to a separate auto-refreshing window
38 Revision 211.5 2000/03/19 22:49:03 ajc
39 * Made the header-bar buttons more visible
40 * Added a "reply" header-bar button
41 * Move "Subject:" lines into the header-bar
42 * Padded the header-bars by one pixel (nicer looking)
43 * Changed message date/time output format
45 Revision 211.4 2000/03/19 19:49:31 ajc
46 * Added support for unix domain sockets
48 Revision 211.3 2000/02/11 23:45:04 nbryant
49 * Makefile.in, configure.in: add, like, some *more* code for FreeBSD
50 * tcp_sockets.c: include <arpa/inet.h>
52 Revision 211.2 2000/02/11 23:30:04 nbryant
53 configure.in: added some code for FreeBSD
55 Revision 211.1 2000/01/11 04:20:40 ajc
56 * Add "close window" option to goodbye screen
58 Revision 211.0 2000/01/04 15:24:16 ajc
59 * Worked around HTTP bugs in Internet Explorer 5. Die, Bill, Die.
60 * This will be released as v2.11; tagged everything as such.
62 Revision 210.0 1999/12/24 04:57:18 ajc
65 Revision 1.121 1999/12/23 04:54:48 ajc
66 * Changed session cookie from hexadecimal encoding to base64
67 * Removed overly verbose logging
69 Revision 1.120 1999/12/12 18:12:28 ajc
70 * get http request: clear hold buffer before starting to read in HTTP request.
71 This was causing some requests to get corrupted.
73 Revision 1.119 1999/12/08 18:25:21 ajc
74 * Increased the size of the backlog queue length passed to accept() and made
75 it a configuration parameter in webcit.h
77 Revision 1.118 1999/12/07 16:09:26 ajc
78 * Better (non fireworks display mode) handling of broken HTTP sockets
80 Revision 1.117 1999/12/06 03:40:29 ajc
81 * Moved a bunch of other global variables to per-session variables
83 Revision 1.116 1999/12/06 02:05:33 ajc
84 * Moved global march list into per-session context
86 Revision 1.115 1999/12/05 18:38:02 ajc
87 * Auto-scaling worker thread pool size
89 Revision 1.114 1999/12/05 17:38:41 ajc
90 * Additional debugging and cleanup
92 Revision 1.113 1999/12/04 22:16:05 ajc
93 * Moved all diagnostic output to stderr
94 * Moved "HTTP/1.0 200 OK" output to output_headers()
96 Revision 1.112 1999/12/04 21:56:59 ajc
97 * Finished the overhaul. Now to tune...
99 Revision 1.111 1999/12/03 17:59:53 ajc
100 * BROKEN BUILD. Wrote most of the session removal code, but some of it is
101 pseudocode so the build is currently broken.
103 Revision 1.110 1999/12/03 16:37:46 ajc
104 * Repaired HTTP output for image transfers and static content
106 Revision 1.109 1999/12/03 05:09:54 ajc
107 * Rewrote the HTTP engine and application coupling to run in a worker thread
108 model and to run as a single multithreaded program (eliminated helper
109 processes and pipes). It currently runs but has many large bugs.
111 Revision 1.108 1999/12/03 00:18:20 ajc
112 * Added ".c.o" rule to Makefile
114 Revision 1.107 1999/11/26 03:32:59 ajc
115 * Started moving all of the global variables into a struct, to facilitate
116 multithreaded server.
118 Revision 1.106 1999/11/26 01:28:10 ajc
121 Revision 1.105 1999/11/04 02:05:02 ajc
122 * Added 'number of worker threads' to site config screen
124 Revision 1.104 1999/10/25 02:25:09 ajc
125 * Shuffled around the room editing commands
127 Revision 1.103 1999/10/14 04:07:18 ajc
128 * Cleaned up the bottom-of-page icons
130 Revision 1.102 1999/10/08 23:58:11 ajc
131 * Minor bug fix in registration screen
133 Revision 1.101 1999/10/06 02:44:02 ajc
134 * Per Nick's request, removed the key bindings stuff. He knows how to fit
135 it back in when it's fixed. Also added more attempts at cache disabling,
136 but it still doesn't work in the StarOffice browser. I don't know why.
138 Revision 1.100 1999/10/02 03:26:14 ajc
139 * Merged in Nick's bit of JavaScript to handle key commands.
140 BROKEN BUILD ALERT!! This runs all the time, even when the cursor is
141 in a text field. Right now you can't even log in.
143 Revision 1.99 1999/09/01 01:06:11 ajc
144 * Added "max message length" field in global config screen
146 Revision 1.98 1999/08/14 18:16:10 ajc
147 * Fixed escputs() and its friends to properly handle ' (single quote) chars
150 Sun Jul 18 20:17:58 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
151 * Did neat stuff to the bottom of the page
153 Mon Jul 12 23:30:24 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
154 * webcit.c: exit Webcit sessions semi-gracefully when the connection
155 to a Citadel server fails.
156 * messages.c: don't auto-link URL's in messages if it would cause
159 Sat Jul 10 17:51:39 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
160 * Recompiled the Java chat applet using a genuine JDK 1.0.2
161 compiler. This should make more browsers happy.
163 Wed Jun 30 19:19:59 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
164 * Added support for "robots.txt" telling spiders to go away.
165 * Do a slrp_highest() when logging off.
167 Sat Jun 26 22:52:13 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
168 * Rearranged the code in "Site-wide configuration" and "Generic
169 server command" to avoid nested server operations
171 Wed Jun 23 21:43:30 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
172 * webcit.c: added "back, top, next" buttons to bottom of each page
173 * menubar.html: replaced "User list" with "Page another user"
175 Tue Jun 22 14:53:05 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
176 * context_loop.c: rearranged some code to try to eliminate deadlocks
178 Fri Jun 18 11:55:58 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
179 * Unknown URL's now display the main menu instead of diagnostics
180 * Diagnostics are now at <baseurl>/diagnostics
182 Mon Jun 7 21:59:45 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
183 * Session no longer locks up when an express message is cancelled
184 * The default Citadel server is now "localhost" instead of uncnsrd
185 * Added some documentation
187 Thu Jun 3 12:18:49 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
188 * roomops.c: made room banner graphics more reliable
189 * messages.c: added code to prevent accidental "double-posting"
190 * who.c: fixed the "Change room/host/user" submit logic
192 Thu Jun 2 09:48:00 EDT 1999 Nick Grossman <nick@ulster.net>
193 * Changed static/menubar.html so the text is readable
195 Wed Jun 2 23:47:58 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
196 * Ditched the frames mode completely. It wasn't working properly in,
197 among other places, IE 5. Die, Bill, Die.
199 Sat May 29 00:25:47 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
200 * Fixed the behavior of the "forget room" routine, to properly handle
201 the transition back to the Lobby after it's all done.
202 * Added ExpressMessageCat() to allow code to send the user messages
203 along with incoming express messages
204 * WebCit now sends the name of the end user's browser as the client
205 name in a Citadel IDEN command rather than its own name.
207 Fri May 21 23:35:17 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
208 * Minor code cleanups
209 * New mail notification
211 Mon May 17 20:59:36 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
212 * Top-aligned all the cells in the fake frames in non-frames mode
214 Fri May 14 23:37:02 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
215 * Initial entry to _BASEROOM_ at login now done as a Skip instead
216 of a Goto, in order to prevent it from first marking all msgs old.
218 Mon May 10 23:09:34 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
219 * Replaced _most_ gotoroom() calls with smart_goto(), a version
220 which can differentiate the needs of frames and noframes modes
222 Sat May 8 01:07:06 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
223 * webserver.c: added "-t" option to send traces somewhere else
225 Tue Apr 27 23:36:35 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
226 * context_loop.c: display an error page if the client browser
227 requests a non-root page and there is no cookie set
228 * webserver.c: took my name off the copyright notice (it's a group
231 Sun Apr 18 23:42:54 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
232 * Reworked a lot of the structure, made more HTML "embeddable"
233 * Changed the noframes mode to display "fake" frames using tables
235 Thu Apr 16 12:00:00 EDT 1999 Nick Grossman <nicl@ulster.net>
236 Changed some output formatting (mainly <FONT> tags).
237 Changed who.c to use urlescputs() rather than escputs()
238 in urls so GOTOs and User Profiles work when the string has a
241 Wed Apr 14 17:56:18 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
242 http://www.webreference.com/dhtml/column18/menuFrLoad.html
243 How to cause "onLoad=" to cause a sibling frame to refresh without
244 having to use the nonportable HTTP "Window-Target:" directive. Began
245 implementation of this; it should allow portable NS/IE compatibility.
247 Wed Apr 7 21:51:33 EDT 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
248 * Implemented "access level required to create rooms"
250 Thu Mar 18 00:23:05 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
251 * webcit.c: modified getz() to *exit* the program when fgets()
252 returns an error. This is actually the desired behavior; it would
253 otherwise busy-loop forever on a broken pipe.
255 Sat Mar 6 19:56:07 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
256 * webcit.c: added to getz() the ability to return an error code;
257 implemented this in the main loop, hopefully fixing problems
258 * Added "braindamage" file (frames/JS browser compatibility list)
259 * Added HTTP "User-agent:" detection
260 * wildmat.c, braindamage.c: added
261 * Initial value of 'noframes' is now set by the braindamage check
262 * Ran everything through "indent -kr -i8"
263 * roomops.c: in room list, print a in otherwise empty cells
265 1999-02-24 Nathan Bryant <bryant@cs.usm.maine.edu>
266 * context_loop.c: warning fix
267 * webcit.c: off_t is a 64-bit `long long' on BSDI (eek!)
269 Sat Jan 30 19:00:58 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
270 * Resolve the name of the connecting host and pass it on to Citadel
272 Fri Jan 29 14:49:49 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
273 * wDumpContent() is now responsible for </BODY></HTML> most of the
274 time (parameter settable) so that the main menu can easily be
275 embedded in every page when running in noframes mode
276 * noframes mode selection is now carried in the cookie
278 Thu Jan 28 20:30:08 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
279 * Made the frames stuff less dependent on the HTML TARGET= directive
280 and more dependent on the HTTP Window-target: directive.
281 * Made the system semi-navigable in noframes mode.
283 Sat Jan 23 19:36:10 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
284 * Brought over the new room listing code and <G>oto heuristics
285 from the main Citadel tree, to pay attention to floor/room ordering
287 Thu Jan 14 17:14:11 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
288 * Modified the back end of mime_parser to use callbacks instead of
289 doing something specific. Now we can use it elsewhere.
291 Mon Jan 11 21:53:16 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
292 * Fixed the bugs in "Site-wide configuration"
293 * Added a "generic server commands" screen
295 Fri Jan 8 22:20:54 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
296 * Reduced the multiple cookies down to one cookie combining all data.
298 Mon Jan 4 23:04:36 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
299 * Removed wc_host and wc_port cookies.
300 * Added an "edit your session" screen to change your wholisting.
302 Sun Jan 3 20:05:31 EST 1999 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
303 * Added "enter registration"
304 * Set up automatic trigger of Enter Registration when the server
306 * Established that a one-to-one WebCit/Citadel correspondence will
307 be required. No big deal due to shared code segments.
308 * Added "change password"
309 * Added networking configuration screens. These still need testing.
310 * Added a "kill session" link to each line of the wholist when
311 logged in as an aide, and the screens to perform this operation.
313 Thu Dec 31 21:53:20 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
314 * Final cvs commit for 1998 (an awful year, I'm glad to see it over).
315 * "Finished" the MIME parser.
316 * Got image uploads working.
317 * Added "add/edit user photo" screens.
318 * Added "add/edit room graphic" screens.
319 * Added "add/edit floor graphic" screens.
320 * Fixed display of floor graphic in known rooms list.
322 Wed Dec 30 20:36:13 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
323 * Wrote mime_parser.c for handling of image uploads. This will also
324 be used in future Citadel MIME projects.
326 Tue Dec 29 23:25:50 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
327 * Fixed a bug in the room banner display code
328 * Added "delete room"
329 * Added "validate users"
331 Mon Dec 28 00:26:01 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
332 * Added "edit room info file"
335 Sat Dec 26 23:12:47 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
336 * Changed the "auto read new" functionality from a meta refresh tag
337 to an "onload" directive (the former was causing graphics problems)
338 * Added "create room"
341 Tue Dec 22 22:35:50 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
342 * Got the Zap and List-Zapped commands working
343 * Added a convenience function to display a page with an error string
344 * Automatically do a read-new-msgs whenever a new room banner is loaded
346 Thu Dec 17 20:38:00 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
347 * Added the screens to send pages
348 * Changed message headers to display in bigger font, non-boldface
349 * Added the chat system
350 * Added goto private rooms
352 Wed Dec 16 16:23:58 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
353 * Replace "Citadel/UX" in menu bar with the Citadel/UX logo
355 1998-12-14 Nathan Bryant <bryant@cs.usm.maine.edu>
356 * automatically regenerate Makefile when Makefile.in changes
358 Sun Dec 13 13:35:12 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
359 * context_loop.c: Moved "remove session" into its own function.
360 Check for dead webcit child process before each transaction.
361 * Ignore SIGPIPE; this seems to magically make the program bulletproof
362 against broken HTTP connections.
363 * Added a housekeeping thread to periodically remove dead sessions
364 and kill idle sessions.
365 * messages.c: added "delete message" functionality
366 * messages.c: added "move message" functionality
367 * userlist.c: added. This adds "userlist" and "show user" functions.
368 * roomops.c: fixed buggy implementation of ungoto
369 * Set up an option in output_headers() to optionally print the most
370 often used opening HTML as well as the HTTP headers.
371 * Display express messages in cute little JavaScript popup window.
373 Fri Dec 11 21:14:36 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
374 * Brought over message reading and entry functions from old WebCit
376 1998-12-10 Nathan Bryant <bryant@cs.usm.maine.edu>
377 * context_loop.c: really fix the SO_LINGER stuff
378 * webserver.c: remove commented-out references to SO_LINGER
380 Wed Dec 9 18:50:46 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
381 * context_loop.c: After fork(), child process closes the HTTP socket
382 so when the parent process closes it, it actually _does_ close.
383 Otherwise, aIEeeee and possibly other browsers will hang.
384 * Added support for graphics images retrieved from the Citadel server.
385 * Set up login banner graphic and background image graphic
387 1998-12-09 Nathan Bryant <bryant@cs.usm.maine.edu>
388 * context_loop.c, webserver.c, webserver.h: SO_LINGER and locking fix
390 Wed Dec 9 11:13:48 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
391 * Smoothed out some of the login/logout code. Failed authentication
392 now works the way it should.
393 * Added support for new user login (still need to handle registration).
395 Tue Dec 8 15:45:42 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
396 * Discovered that the HTTP socket problem is related to a socket that
397 isn't properly lingering on close. Temporarily hacked a sleep(10)
398 into context_loop.c until it is figured out.
400 Mon Dec 7 17:03:18 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
401 * Did a little debugging, still trying to figure out why logging in
402 displays "Connection reset by peer" error. It used to work...
404 1998-12-07 Nathan Bryant <bryant@cs.usm.maine.edu>
405 * Makefile.in: updated dependencies
407 Sun Dec 6 19:50:55 EST 1998 Art Cancro <ajc@uncnsrd.mt-kisco.ny.us>
408 * Fixed broken interpretation of variables specified in the URL
409 * added new "action" variable to make main loop simpler
411 1998-12-06 Nathan Bryant <bryant@cs.usm.maine.edu>
412 * webserver.c: prototype vsnprintf
413 * context_loop.c: warning fix
415 1998-12-05 Nathan Bryant <bryant@cs.usm.maine.edu>
416 * tcp_sockets.c: removed some dead code
417 * context_loop.c: oops, I made a memory leak. fix fix fix. also close
418 unused ends of pipes, fix a file descriptor leak and a race condition
419 * portability enhancements
421 1998-12-04 Nathan Bryant <bryant@cs.usm.maine.edu>
422 * webserver.c, context_loop.c, webcit.c: add commandline args for host
424 * converted to autoconf and began port to Digital UNIX
426 * context_loop.c: moved the monster 64k buffer array off the stack
427 * tcp_sockets.c: getservbyname() doesn't set errno.
429 1998-12-03 Nathan Bryant <bryant@cs.usm.maine.edu>
430 * webserver.c: warning fix