Commit Graph

  • dd48e2fe24 Bug fix. I think this fixed a long standing bug in the brainstorm web server. Partial_Update Wynne Crisman 2016-08-17 17:56:41 -07:00
  • 040a3b4ddc Modified build script to use jdk 1.7 instead of 1.5 for building the release compile; Added debug output to try to identify the error where interestOps isn't set properly for a socket that isn't yet closed; Fixed index exception in identifying the host; Fixed odd build errors in the development environment by removing and re-adding referenced projects. Wynne Crisman 2016-02-22 10:40:27 -08:00
  • 7034a00093 Revert "Modified build script to use jdk 1.7 instead of 1.5 for building the release compile; Added debug output to try to identify the error where interestOps isn't set properly for a socket that isn't yet closed; Fixed index exception in identifying the host." master Wynne Crisman 2016-02-22 10:30:17 -08:00
  • 5d9ea7528b Modified build script to use jdk 1.7 instead of 1.5 for building the release compile; Added debug output to try to identify the error where interestOps isn't set properly for a socket that isn't yet closed; Fixed index exception in identifying the host. Wynne Crisman 2016-02-22 10:27:22 -08:00
  • 439eca5e9d Fixed bug in host detection for non-SSL HTTP sockets. wcrisman 2014-12-29 13:22:07 -08:00
  • eb4a935562 Changed key.channel().close() into just calling close on the SocketContext throughout the code. Comment changes and debugging additions and changes. wcrisman 2014-12-29 11:57:32 -08:00
  • f9be168cc8 Changed SocketContext.writeClientBoundPlainMessage() to be more like the master branch. Removed commented code. wcrisman 2014-12-29 11:08:28 -08:00
  • c0a4621a4c Enabled the queuing of messages in a linked list again (from the writeOutgoingMessages() method. Removed commented code and comments. wcrisman 2014-12-29 10:57:06 -08:00
  • b6d57986f2 Reorganized SocketContext code so that methods are in the correct order to compare with the master branch. Added code back in and updated code as necessary to be as identical as possible to the master branch for the Websocket related methods and classes. Updated PassThroughSocketContext to be as identical as possible to the master branch. Updated NetworkListener to be as identical as possible to the master branch. Commented a number of TODO's in SocketContext for turning on bits of code that might cause problems, but will bring this branch up to speed with the master branch. wcrisman 2014-12-29 10:35:10 -08:00
  • 5aece2300e Finished fixing the bug in the last two commits where by the content filling the buffer was causing major problems with the resulting client display (not sure why and don't care). wcrisman 2014-12-29 09:24:51 -08:00
  • b3648439e6 Fixed bug where initialization wasn't affecting the isClosed status of a message (not initialized meant that the buffer was null which indicated the message was closed before it had ever started being sent). Moved isInitialized into the MessageBuffer base class. wcrisman 2014-12-29 09:18:59 -08:00
  • 28e0787f94 Fixed compilation bug. wcrisman 2014-12-28 23:08:21 -08:00
  • ce99adb839 Added HttpMessageBuffer and modified MessageBuffer to be identical to the code in the master branch. Modified SocketContext.queueOutboundClientMessage() to be identical to the master branch. Changed SocketContext.sendHttpResponse() to call the queueOutboundClientMessage() passing a new HttpMessageBuffer. Fixed errors as necessary to make it all compile. wcrisman 2014-12-28 22:03:40 -08:00
  • 6cbd188867 Modified prepareResponse() to call queueOutboundClientMessage instead of directly setting the currentOutboundMessage. wcrisman 2014-12-28 21:13:24 -08:00
  • c7188095d0 Copied SocketContext.readIncommingMessages() from the master tree and updated as required to fix errors. wcrisman 2014-12-28 20:55:16 -08:00
  • 840fa8dd89 Changed the SocketContext.writeOutgoingMessages() to copy the code in the master tree. Changed the SSL reading code to call the new writeClientBoundMessage() with the proper parameters. Removed internalProcessResponses(). wcrisman 2014-12-28 20:33:03 -08:00
  • bd3e9ac5cc Changed code in SocketContext.writeClientBoundSslMessage() to sync it up with the master branch (they are now identical (or nearly). wcrisman 2014-12-28 17:45:22 -08:00
  • eb3574bb3f Made AbstractSocketContext.id private and added an accessor to help merge code between branches. Modified WebServer.debug to be private with a public accessor to make code mergable between branches. Fixed code in NetworkListener and SocketContext to use accessors instead of attributes for id and debug. Modified SocketContext.writeClientBoundSslMessage() to take the channel and currentOutboundMessage as parameters to make code more mergable, and added debug output from main branch. Removed calls in the SSL code to chain buffers in a MessageBuffer, which should not be used currently anyway, and won't be used in the future. wcrisman 2014-12-28 17:15:57 -08:00
  • d1d5671229 Fixed bug in the internalProcessResponses() in SocketContext where a message was flagged as needing to send more data because of already encrypted but unsent data, but was not properly sending the data because the currentOutboundMessage was closed and cleared. wcrisman 2014-12-28 17:09:06 -08:00
  • 0c3b7d026b Fixed bug in MessageBuffer to close the buffer instead of just setting buffer = null. Modified MessageBuffer to close the response if closed its self. Modified SocketContext to get rid of the response linked list, and close the outbound message instead of the response (no more references to Response). Modified SocketContext to immediately create a MessageBuffer from a Response that is ready to be sent, and set it as the currentOutboundMessage (no list or linked list used currently). Modified writeSessionCookies() and prepareResponse() in SocketContext to take the Response as a parameter. wcrisman 2014-12-28 16:03:49 -08:00
  • a9a0e799e2 Short circuited the response linked list since it shouldn't be being used. wcrisman 2014-12-28 14:52:24 -08:00
  • 7a75ba30de Split sending message code into SSL and plain. wcrisman 2014-12-28 14:48:03 -08:00
  • 7f4d6702a0 Revert "Modified SocketContext to use a queue and an active reference to the outbound messages instead of multiple linked lists." wcrisman 2014-12-28 14:38:27 -08:00
  • 06cbff7cf0 Modified SocketContext to use a queue and an active reference to the outbound messages instead of multiple linked lists. wcrisman 2014-12-28 10:43:25 -08:00
  • 3e1a531fc3 Separated inner classes from WebServer. wcrisman 2014-12-28 09:32:25 -08:00
  • ba35deff06 Revert "Switched to using HttpMessageBuffer in the code and moved the code from prepareResponse into initialize." wcrisman 2014-12-26 10:17:33 -08:00
  • 6c9931d4f9 Revert "Simplified writeOutgoingMessages() and removed the call to internalProcessResponses(). Likely bugs in writeClientBoundMessage()." wcrisman 2014-12-26 10:17:15 -08:00
  • 72fa63028e Revert "Fixed bugs in writeClientBoundMessage." wcrisman 2014-12-26 10:16:49 -08:00
  • 7152465730 Revert "Updated/Fixed queueOutboundClientMessage(..), sendHttpResponse(..), and hasPendingWrite()." wcrisman 2014-12-26 09:28:37 -08:00
  • 48724e445c Updated/Fixed queueOutboundClientMessage(..), sendHttpResponse(..), and hasPendingWrite(). wcrisman 2014-12-10 17:51:41 -08:00
  • a30fcb4002 Fixed bugs in writeClientBoundMessage. wcrisman 2014-12-10 17:07:47 -08:00
  • 29ade9b7b0 Simplified writeOutgoingMessages() and removed the call to internalProcessResponses(). Likely bugs in writeClientBoundMessage(). wcrisman 2014-12-10 16:31:22 -08:00
  • c36467d172 Switched to using HttpMessageBuffer in the code and moved the code from prepareResponse into initialize. wcrisman 2014-12-10 14:37:55 -08:00
  • d00638873b Applied some of the changes to the structure of WebServer that were least controversial. Some of the code added is not yet used. HTML5_Websocket_Attempt_2 wcrisman 2014-12-08 17:23:59 -08:00
  • acbae41318 Reversed that last change which did cause a bug (but not the bug unfortunately), and implemented the last change which might cause issues. wcrisman 2014-12-07 21:40:13 -08:00
  • 6bd73c6875 Removed commented old code. Made one more minor change that might break things. wcrisman 2014-12-07 21:24:32 -08:00
  • b6b8de62fb Commented out all the flagging code, leaving two possible bits of code that could cause an error. wcrisman 2014-12-07 21:19:05 -08:00
  • 866e8d8bbd Switched the WebServer to detecting which flags to apply to a socket based on whether there is a pending write or remaining byte in the encrypted write buffer (likely a cause of the bug). wcrisman 2014-12-07 20:33:18 -08:00
  • d0360ad252 Merged as many changes as possible in WebServer from the master branch without including any that would likely cause problems. wcrisman 2014-12-07 20:19:51 -08:00
  • 3d08ad5810 Added a few more changes into the mix. Only changes left are in WebServer. wcrisman 2014-12-07 18:38:04 -08:00
  • ae1de97e91 Fixed compile errors by transferring more of the changes to this new branch. Previous upload doesn't compile. wcrisman 2014-12-07 18:34:03 -08:00
  • 2adcfad863 Merged many of the changes from the first attempt at an HTML5 Websocket implementation. Focused on the ones that didn't change the behavior of the web server. wcrisman 2014-12-07 16:12:29 -08:00
  • 46df41d433 Added debug output showing the message header for a HTTP message that failed to be read. wcrisman 2014-09-17 09:49:04 -07:00
  • b48e81bfe0 Added exception handling in the main loop for the web server to avoid the main loop thread getting killed off due to an unexpected/unhandled exception. Moved code for JSON handling and metadata/metadata container into the Common project from the Foundation project. wcrisman 2014-09-16 14:01:31 -07:00
  • 1a8fd62dd8 Modified the web server to use a dedicated thread to handle socket management. It now will setup new sockets, and pass request and response handling for each socket needing it to a runnable run through the thread service. This may impact performance (not sure which direction) and will ensure that socket listening is never dropped in favor of message processing. wcrisman 2014-08-30 17:28:58 -07:00
  • fa572dae03 Modified ThreadService & Scheduler to allow the web server to pass a delegate service such that all webapps will use one service for each function (reduction in threading and debug complexity). wcrisman 2014-08-30 15:43:30 -07:00
  • fba1f9f9b3 Re-added the clearing of SocketContext's request reference since it was causing problems with future requests. wcrisman 2014-07-30 23:39:57 -07:00
  • 12d99f8b4d Removed dead code. Change to WebServer's listener code to ensure that there is always a thread listening (we somehow ended up with no thread listening in some cases). wcrisman 2014-07-30 23:21:05 -07:00
  • cd0976ea2e Ensured the NPE should never again happen by accessing the request from the response instead of from the socket context. wcrisman 2014-07-27 22:13:01 -07:00
  • 164841677b Fixed NPE due to request being cleared before it should be since we now don't send the response immediately back on the socket, but rather on another socket listener thread. wcrisman 2014-07-27 22:10:16 -07:00
  • 0b5e458dff Removed double lock requirement for pass through sockets. wcrisman 2014-07-27 22:04:42 -07:00
  • b0ae8b7e72 Merge branch 'master' of http://192.168.2.29:8990/r/Brainstorm wcrisman 2014-07-18 17:21:36 -07:00
  • 1cb59ffa71 Added clear to the socket read buffer to ensure it is in a writeable state. wcrisman 2014-07-18 17:21:12 -07:00
  • f5aa28e604 Fixed socket flagging bug that threw exceptions when flagging to read/write to a socket that has closed. Wynne Crisman 2014-07-18 17:14:13 -07:00
  • 7522497634 Reverted last change and removed new code completely (wasn't working - no reason to figure out why since it was now more complicated than the code it intended to clean up). wcrisman 2014-07-18 14:50:21 -07:00
  • 1147864416 Re-enabled the old code with the new fix for the SSL failure. wcrisman 2014-07-18 14:30:59 -07:00
  • 06b0525f6d Added check for key validity before changing interestOps to avoid pointless exception. Modified message buffering code to not load the next message to be sent if we are waiting for more content from the current message (currently shouldn't happen). wcrisman 2014-07-18 14:23:16 -07:00
  • 2a6f2f959e Rolled back changes to WebServer because they were causing some issues with SSL. Should investigate why the issues are occurring since the newer code should be more correct. Modified build.xml (ant) to clean before any rebuild all due to having some inconsistency issues in the build. wcrisman 2014-07-18 12:50:29 -07:00
  • b7a830e6ae Stopped tracking generated files; Ignored all webapp caches. Wynne Crisman 2014-07-17 14:50:19 -07:00
  • 3cf6011121 Fixed bug in stopping the ThreadCreator when shutting down the ThreadService. wcrisman 2014-07-17 14:28:08 -07:00
  • 499a70091b A hail mary to fix the deadlocking of request/responses in https over the internet (slow connections). Not sure if this will work at all. Tried to fix the null target exception (very strange since it should be possible) in the ThreadService. wcrisman 2014-07-17 12:19:22 -07:00
  • c48c065265 Modified WebServer to clean up the threading of socket communications: Made all communications via a socket (in or out) and via a linked pair of sockets (in or out of either when forwarding requests and responses to a remote server) single threaded; Attempted to clean up the way the socket listener flags are set. Cleaned up ignored resources in the Brainstorm WebServer project by removing them from the repository. wcrisman 2014-07-17 12:15:07 -07:00
  • edf8748a3c Stopped tracking the webapp related files in the web server project. wcrisman 2014-07-16 13:15:36 -07:00
  • 645a8c0a4b Attempted a different fix to the streamed content code so that it is blocking (previous fix failed for an unknown reason, and the code was getting complex unnecessarily). wcrisman 2014-07-13 13:46:29 -07:00
  • 2fc70088c1 Fixed newly introduced bug where by a blocking channel deadlocks because all content was read, but we attempted to read more anyway. wcrisman 2014-07-13 12:54:10 -07:00
  • 11b75d567f Fixed bugs in web server's handling of streamed content (logic was incorrectly handling non-blocking IO in the stream - interpreting it as a stream closed). Modified StreamedContent to use blocking IO instead of non-blocking since it was wasting CPU cycles (non-blocking IO done properly would require removing the write flag from the client socket and listening to the StreamedContent for the availablity of content before re-flagging the socket for writing). Using non-blocking IO here really isn't that useful since the content source should be trusted and timely, and multiple threads service clients (a few threads blocking for a few milliseconds is no big deal), and implementing it properly would significantly increase code complexity. wcrisman 2014-07-13 12:19:30 -07:00
  • 837fdced57 Fixed bugs in web server that ignored when the web app sets a header that overrides anything that would normally be generated (for forwarded content). wcrisman 2014-07-13 11:01:23 -07:00
  • c06e555510 Added warnings to Monitor regarding unlocking with a thread that did not perform the locking; Added extra debug output for this occurrence. wcrisman 2014-07-12 21:33:45 -07:00
  • 17e9c5a153 Removed fancy debug logging from web server to prevent logging causing logging due to logging Monitor lock/unlock calls. Need to replace this logging code with a non-framework queue to allow remote management of the web server and log transfer. wcrisman 2014-07-12 15:49:35 -07:00
  • 0081ad43b9 Fixed bugs introduced into Monitor when adding debug info and simplifying. wcrisman 2014-07-11 17:13:25 -07:00
  • 985228d213 More changes to Monitor to attempt to catch a bug. wcrisman 2014-07-11 16:17:49 -07:00
  • b11dc14fb3 More changes to Monitor to attempt to catch a bug. wcrisman 2014-07-11 15:51:51 -07:00
  • 66487c3b25 Fixed bug in handling of sessions - some non-standard web apps (forwarding domains for example) in fact will have null sessions attached to their connections. Non-breaking change. wcrisman 2014-07-11 15:39:28 -07:00
  • 54b2f9b5ad Minor changes to Monitor to attempt to find a bug. wcrisman 2014-07-11 15:29:08 -07:00
  • 2b035e092c A second round of fixes to simplify the web application setup code and provide for a connection context accessible by the application when handling web requests. wcrisman 2014-07-11 12:32:03 -07:00
  • 07b8c2ff8d Fixed bugs from last commit. wcrisman 2014-07-11 10:41:39 -07:00
  • d2027e13f9 Modified the web server to allow connection related data to be stored in the connection's context by the application. This modifies the contract (interfaces) between the framework and application code, requiring changes to the application (breaks backward compatibility). wcrisman 2014-07-11 10:39:36 -07:00
  • bb9b1f550e Fixed TCP no delay in the PassThroughSocketContext. Ignored the eclipse metadata. wcrisman 2014-05-30 12:11:28 -07:00
  • b45e56b890 Initial commit from SVN. wcrisman 2014-05-30 10:31:51 -07:00