Georg Hopp
1fb8628861
fix memory leak introduced when https was added as well as a bug in request line parsing
14 years ago
Georg Hopp
d0368bb28b
GET and POST vars are now parsed when request ist parsed. COOKIE will follow. While parsing the request line i also get pic the path from it.
14 years ago
Georg Hopp
646d1e1c50
Added a new abstraction: hash. A a lot of things within http are key/value things based on stings i created this generic hash class and use it to store the header right now. In future it will also be used to store cookie, get and post vars
14 years ago
Georg Hopp
662e3aac43
move jquery init into separate js file and server action
14 years ago
Georg Hopp
78ee46aa49
Username is shown again in the frontend
14 years ago
Georg Hopp
d4b1c3fd3a
now the session livetime is shown with a bar, as well as the current session id. These are updated on reload or ajax call.
14 years ago
Georg Hopp
69cfdd07cc
moved several static content to various files
14 years ago
Georg Hopp
1af8b32fdf
Some fixes:
- skipNonAlpha now really skips NON alpha chars
- parserBody now reads the MIN of want to what's available
- changed the order in body read...an 0 nbody leads to immediate
completion, than the first check is if the buffer is empty and only if
it's not data is read. fixes #20
14 years ago
Georg Hopp
f1215c6758
closes #19 : first integration of OpenSSL...this makes leak testing with valgrind a pain so i will think about some conditional to activate and deactivate it. Additionally it seems that some memory will be left over somewhere, maybe i missed somed cleanup function i have to call and finally the integration really needs error handling.
14 years ago
Georg Hopp
4893b4173e
fix leak on shutdown created because of missing to delete new stream class on shutdown
14 years ago
Georg Hopp
5b3fed549f
refs #19 : Added a stream class. This is a delegate that uses the correct read and write methods for the given stream type. This is implemented as prerequesite for the SSL implemented
14 years ago
Georg Hopp
10f00ec3d3
some changes on the build system to create the first distribution
14 years ago
Georg Hopp
1d238aa55d
as i have a lot of static string initialization with the length of that sting a created and used a macro to prevent errors
14 years ago
Georg Hopp
a0ec357e0a
closes #11 : first very crude session handling implementation, no persitence no memory cleanups, spread over to much files TODO: clean this
14 years ago
Georg Hopp
0c3d467bd6
change to 10 seconds interval
14 years ago
Georg Hopp
a4cab3ef19
make value to string as this is the easiest way to support leading 0 as in 05, 08, etc.
14 years ago
Georg Hopp
1466081448
some cleanups
14 years ago
Georg Hopp
48c8b070fc
changed ajax to get json and integrate a javascript countdown.
14 years ago
Georg Hopp
16fdf54de5
now the internal random value will be create only once every 30 seconds thus one can see that it is realy an internal state of the server
14 years ago
Georg Hopp
08533a4b62
oops, forgot one file
14 years ago
Georg Hopp
4b5bcf89c0
a taste of ajax
14 years ago
Georg Hopp
1fdcbd40f6
log when connect fails
14 years ago
Georg Hopp
c1afe88fd4
log when connect fails
14 years ago
Georg Hopp
e73c8d959d
get rid of some unneccessary system calls...one socket and one close
14 years ago
Georg Hopp
4f95d8ce11
change worker to a generic one, some cleanups in server
14 years ago
Georg Hopp
5b2ee457e0
moved httpResponseWriter to httpWriter
14 years ago
Georg Hopp
b7e5348744
fix another small typo
14 years ago
Georg Hopp
fc3c4ecb02
fix bug in call to httpParserHeader
14 years ago
Georg Hopp
ee6040201e
moved request parser to generic parser. This is now able to create either a request or a response message dependent on the initial message line (version first or last). TODO change constructor of response to use a len parameter for the reason
14 years ago
Georg Hopp
95c0d00944
get rid of some function calls when selection interfaces
14 years ago
Georg Hopp
6591c0a6c7
changed callocs of memory not needed to be initialized to malloc
14 years ago
Georg Hopp
0b72a3b150
saved another loop as i calculate the header string size when it is created.
14 years ago
Georg Hopp
1295321291
add cookie header again
14 years ago
Georg Hopp
e4975a92c0
optmize header search
14 years ago
Georg Hopp
9f801ba422
changed all string operation within header handling with fixed length mem operations, preventing multiple iterations over these strings. In theory this should improve performance in reality it seems that it is worse...CHECK WHY
14 years ago
Georg Hopp
ac6873fe57
fix initialization of search value
14 years ago
Georg Hopp
87b0d50d1d
structural changes for worker/process. @TODO actually i have no idea why this happens.
14 years ago
Georg Hopp
dfcbc4946c
fix memory problems occured with latest changes
14 years ago
Georg Hopp
fc4fd8f66d
fixed bug in keep-alive check arised by implementation if #10
14 years ago
Georg Hopp
59ccbf0207
closes #10 : values for header ids are now stored in a char ** making multiple values for one id possible. Additionally added a jquery action that delivers the jquery java script and use it on the me action
14 years ago
Georg Hopp
424297cd57
now when a constructor returns -1 the new call will in turn call the destructor effectively freeing all resources. ATTENTION: now the destructor has to be aware that it might be called with a not completely initialized object. To make this more ease there is the FREE makro with the corresponding ffree that does NULL pointer checking and the destructor checks for NULL pointer too. Additionally the handle_accept now handles _SC_OPEN_MAX - 10 connections. The 10 are reserved for internal usage.
14 years ago
Georg Hopp
01ae8736e9
now a child is spawned and writes random values in a shared memory segment. These values will be shown in the me action
14 years ago
Georg Hopp
7f688412ea
some code cleanups...no changes in the logic
14 years ago
Georg Hopp
8298740dd9
move sdbm implementation in one file.
14 years ago
Georg Hopp
063189e664
changed /**/ single line comments to //
14 years ago
Georg Hopp
b38d402250
start documenting this whole stuff...well at least add a copyright information in each file
14 years ago
Georg Hopp
7466e59298
first very crude, not complete, experimental 304 test implementation
14 years ago
Georg Hopp
abd69d0a20
disconnect on invalid request line
14 years ago
Georg Hopp
dfdfd20d8e
now incomplete requests should no longer block the complete server. Tested with \'echo -en "GET / HTTP\r\nConn" | nc -w 600 localhost 11212\' and then doing requests from my browser. @TODO : cleanup those stuff, check if a not correctly response reading would block the server.
14 years ago
Georg Hopp
dbb7042360
fixed the non keep-alive performance issue as well as i lower memory usage by using a single read and write circular buffer for every connection. @TODO : i noticed a server hang while getting large data (my image) with non keep-alive connections. Additionally an incomplete keep-alive request might stop the server now as the lock on the read buffer will not be released.
14 years ago