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
2e46b5c249
add forgotten jquery assets
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
eae798e599
increase writebuffer size a lot.
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
Georg Hopp
31b7d755e0
another try with the shmen trick...this time use MAP_ANONYMOUS ... as GNU extension.
14 years ago
Georg Hopp
5c3928d45a
added missing header file to repo
14 years ago
Georg Hopp
f2dbad19c6
another try with a shared memory based ringbuffer...this performs well for keep-alive sessions but is much slower without. actually i am not sure why but most likely the shared memory setup is quite expensive. @TODO : make a profiling.
14 years ago
Georg Hopp
45b4b354ba
fix inf loop. @TODO : This whole handling has to be cleaned.
14 years ago
Georg Hopp
6cd673b4eb
this change hopefully makes the shm trick work on amd64
14 years ago
Georg Hopp
e8a21ace31
lots of changes but primarily change the request parser to use a ringbuffer. The ringbuffer is implemented using the shared memory trick.
14 years ago
Georg Hopp
5c1c6a80cf
some more cleanups in the server code. Removing not needed header includes
14 years ago
Georg Hopp
6550e381f0
now the separated http worker works. Changed some size_t to ssize_t as i use -1 and -2 es error indicator in my server and fixed caculation of remainig buffer size in reader
14 years ago
Georg Hopp
20af2baa6f
separated the server completely from the http processing
14 years ago
Georg Hopp
95d12d808a
add subject/observer interface
14 years ago
Georg Hopp
de00ad47ad
add subject/observer interface
14 years ago
Georg Hopp
b122f341a9
fix infinite busy loop in run
14 years ago
Georg Hopp
3497eb8754
dynamically get and free buffer for response write pipe now
14 years ago
Georg Hopp
e35308f880
increase write buffer
14 years ago
Georg Hopp
92379ebb15
use one dynamic buffer less and save at least one write on small responses
14 years ago
Georg Hopp
6b1605d2a4
removed generated docs
14 years ago
Georg Hopp
4eb98a5a16
fixed bug in new response handling
14 years ago
Georg Hopp
1b7ef5030d
better response handling but still buggy with stream piping
14 years ago
Georg Hopp
c846117638
now load image from actual server
14 years ago
Georg Hopp
0fba746fe2
first working version of content delivery from file....very crude... @TODO : rewrite complete response handline.
14 years ago
Georg Hopp
d87cd09ba1
more generalizing of response writing (implemented a response writer...now it should be possible to implement a stream writer for images
14 years ago
Georg Hopp
fa58a6cc81
make http request and response childs of a common parent http message
14 years ago
Georg Hopp
ab21de50dd
remove now obsoleted header_sort
14 years ago
Georg Hopp
e67667881f
change response to tree based header storage and make everything work.
14 years ago
Georg Hopp
bf6a341b4c
changed header hashing to use btree (GNU only). @TODO : make this conditional for other systems. Removed the qsort calls on server->fds making O(2nlogn) to O(n)
14 years ago
Georg Hopp
3d0057d4c3
daemonize testserver now
14 years ago
Georg Hopp
983c933908
fix seaks and hangs after adding response object (mostly not related with the response object but how i integated it into serverRun
14 years ago
Georg Hopp
f82c178b5b
started a response handler and changed serverRun to use it for its response
14 years ago
Georg Hopp
9198f7e7aa
fixed bug at server destructor
14 years ago
Georg Hopp
cb50f09adc
reset keep_live flag on connection close
14 years ago
Georg Hopp
3d735c7fc7
made a first cruel handling for keep-alive and non keep-alive requests. @TODO : this MUST BE cleaned
14 years ago
Georg Hopp
6c888a8c07
now only use keep-alive....
14 years ago
Georg Hopp
a4d09213ba
moved request_parser.h and request_queue.h in separeate request subfolder
14 years ago
Georg Hopp
6aef05cf7f
fix rather nasty reentrance bug
as i first wrote the parser i used static valiables to hold the
state of the currently parsed request.
If a request would spread of multiple reads this would lead
to one reqeust messing up the state of another.
not those states are part of the parser object itself where
they belong.
14 years ago