Mukund Sivaraman
024b317de0
Convert tabs to spaces
2008-12-08 13:39:44 +00:00
Mukund Sivaraman
4c1ede779e
Break at 80 columns
2008-12-08 12:26:08 +00:00
Mukund Sivaraman
a257703e59
Reformat code to GNU coding style
...
This is a commit which simply ran all C source code files
through GNU indent. No other modifications were made.
2008-12-01 15:01:11 +00:00
Mukund Sivaraman
249d4b7f33
Updated copyright, license notices in source code
...
The notices have been changed to a more GNU look. Documentation
comments have been separated from the copyright header. I've tried to
keep all copyright notices intact. Some author contact details have
been updated.
2008-05-24 13:35:49 +05:30
Mukund Sivaraman
31766cce90
Renamed file to replace underscores in it with dashes
2008-03-13 15:07:43 -07:00
Robert James Kaes
c0299e1868
* [Indent] Ran Source Through indent
...
I re-indented the source code using indent with the following options:
indent -kr -bad -bap -nut -i8 -l80 -psl -sob -ss -ncs
There are now _no_ tabs in the source files, and all indentation is
eight spaces. Lines are 80 characters long, and the procedure type is
on it's own line. Read the indent manual for more information about
what each option means.
2005-08-15 03:54:31 +00:00
Robert James Kaes
a59117c7ca
* Updated Copyright Email Addresses
...
Updated the copyright email addresses for Robert James Kaes. The
users.sourceforge.net address should always exist.
2005-07-12 17:39:44 +00:00
Robert James Kaes
cc90414b29
(send_http_message): Changed the function to use the new http_message
...
API.
2003-03-14 06:15:27 +00:00
Robert James Kaes
a46bfdc2e0
Moved the send_http_error_message() and indicate_http_error()
...
functions into the htmlerror.c file, and recoded them to use the new
variable substitution system. [Steven Young]
2003-03-13 21:34:38 +00:00
Robert James Kaes
0a20bdd5b4
Removed the "bool_t" type since it conflicts with the newer C standards.
...
The type was just replaced by "unsigned int" types.
2002-12-04 17:06:14 +00:00
Robert James Kaes
820832a647
(create_file_safely): Rather than exiting the program if there is an
...
error, a negative "error code" is returned to the program. The
various callers then need to decide what to do.
(pidfile_create): Returns an error status depending on whether the PID
file was created successfully.
2002-11-21 21:51:34 +00:00
Robert James Kaes
ab574cbec0
(create_file_safely):
...
(pidfile_create): Changed all the error logging to write to standard error and then exit the program. This will prevent segmentation fault problems from occurring because the log file could not be created properly.
2002-07-09 19:02:57 +00:00
Robert James Kaes
2f84b170a6
Removed the rotate_log_files() function since I'm moving to an Apache style where the _user_ needs to move the log file themselves, and tinyproxy will continue to write to the original name. This allows more flexibility for users to determine their own log rotation scheme.
2002-06-15 17:28:19 +00:00
Robert James Kaes
833186b7be
(create_file_safely): Added the "truncate_file" boolean flag. This is needed since I use this function for both the log file and the pid file, and they behave differently when tinyproxy is started.
...
(pidfile_create): Call create_file_safely() with a TRUE "truncate_file" flag so that the file is emptied whenever the pid file is needed.
2002-05-31 18:26:30 +00:00
Robert James Kaes
391a408eee
Fixed a tonne of spelling mistakes.
2002-05-24 04:45:32 +00:00
Robert James Kaes
b77fc5c860
Moved most of the function into separate files: the heap debugging
...
functions are in "heap.c"; the daemon functions are in "daemon.c"; and,
the string/text functions are in "text.c".
2002-05-23 18:28:12 +00:00
Robert James Kaes
3284f365b2
Check the return value of the write_message() function.
2002-04-28 20:03:53 +00:00
Robert James Kaes
9a8d732a13
Changed all calls to strdup to safestrdup. This should provide better
...
memory usage tracking.
2002-04-18 17:59:21 +00:00
Robert James Kaes
ce4687fbf9
Added the debuggin_strdup() function and the associated safestrdup()
...
macro. Also, added asserts to the other debugging_* functions.
2002-04-18 17:49:14 +00:00
Robert James Kaes
5822ec3d44
Moved the log rotation code out of the signal handler and into it's own
...
function. The signal handler now simply sets a flag which is monitored
inside the thread_main_loop() function. The log rotation code has also
been tightened to handle any error conditions better. Credit to Petr
Lampa for suggesting that system functions inside of a signal handler is
bad magic.
2002-04-18 16:57:06 +00:00
Robert James Kaes
04da777bed
Removed the duplicate calls to strlen().
2002-04-16 03:22:16 +00:00
Robert James Kaes
f0b6861998
Added an assert() call to detect design errors.
2002-04-15 04:13:14 +00:00
Robert James Kaes
a5d3212751
Changed the error boolean flag into a pointer to an error string and an
...
error code. We're storing this information because tinyproxy doesn't
output the error information until _after_ the client has sent it's
information.
2002-04-15 02:07:27 +00:00
Robert James Kaes
bf82c863bc
Just a variable name change to make it easier to read.
2002-04-07 21:37:07 +00:00
Robert James Kaes
9520866ab3
Changed send_http_message() to use the write_message() function.
...
Changed httperr() to use the same concept as the write_message() function.
Still haven't figured out how to combine the code.
2001-12-24 00:02:32 +00:00
Robert James Kaes
d6e5285e95
Updated the copyright notice.
2001-12-20 04:48:52 +00:00
Robert James Kaes
fa193dcd22
send_message changed to send_response_message in the conn_s structure.
2001-11-25 22:08:11 +00:00
Robert James Kaes
4aa5e79cdf
Added the chomp() function (to replace the trim() function reqs.c)
2001-11-23 01:19:15 +00:00
Robert James Kaes
787ece6c01
Reformated text.
2001-11-22 00:31:10 +00:00
Robert James Kaes
4ac03908fc
Header reorganization. Basically all system headers are now included in
...
tinyproxy.h and all the other files include the tinyproxy.h header. This
moves all the dependancy issues into one file.
2001-10-25 17:27:39 +00:00
Robert James Kaes
d3b099140f
Some code clean up due to the creation of the conns.{c,h} files which now
...
store the creation/destruction and definition of the connection structure.
2001-10-25 16:58:50 +00:00
Robert James Kaes
b7b4d08758
Error message cleanup to make the information more informative.
2001-10-24 00:37:23 +00:00
Robert James Kaes
6ab7ebcb31
send_http_message() doesn't create a memory block and store it in the
...
connection's output_message variable. Instead the error is sent to the
client right away. Once we finish processing the client's headers it will
automatically accept the error message. So we get the same result, but
less memory is used.
2001-09-16 20:13:52 +00:00
Robert James Kaes
9860222979
Added the send_http_message() function to handle sending messages back to
...
the client. It's used by httperr() and showstats().
2001-09-15 21:29:59 +00:00
Robert James Kaes
e2f10bc2ea
Added the debugging realloc() function.
2001-09-11 19:27:27 +00:00
Robert James Kaes
4923dd22a7
Added the debugging_(malloc|calloc|free) functions to help track memory
...
usage. There are also now defines for safe(malloc|calloc|free) which allow
for debugging code to be enabled or not.
2001-09-08 18:55:58 +00:00
Robert James Kaes
1a9dc4e7e8
Error message cleanup.
2001-09-07 04:21:07 +00:00
Robert James Kaes
fc94a56f56
Removed the xstrstr() function since it is no longer used. reqs.c was the
...
only place it was called from, and strstr() will do the same work.
2001-08-30 16:52:56 +00:00
Robert James Kaes
ee892c109b
Added an extra CRNL to the end of the HTML body.
2001-08-28 04:33:54 +00:00
Robert James Kaes
f7d0ea8784
Changed the MIME type to text/html rather than the incorrect text/mime.
2001-08-27 17:46:50 +00:00
Robert James Kaes
3b5e17d579
Split the headers from the message body. Also now include proper headers
...
like Date, Server, Content-Length, etc. Also, fixed the type for an error
message to be const char*.
2001-08-27 03:45:34 +00:00
Robert James Kaes
7febdd028c
Changed all references to log() to log_message().
2001-05-27 02:38:46 +00:00
Robert James Kaes
2f2d74e9f2
Fixed a potential security bug in http_err. There was a possibility of a
...
heap overflow exploit.
2001-01-15 17:06:19 +00:00
Robert James Kaes
1efe0265de
Removed the xmalloc() and xstrdup() functions.
...
Added the pidfile_create() function.
Added the OpenBSD style strlcat() and strlcpy() functions.
2000-09-12 00:01:29 +00:00
Steven Young
37e63909c0
This commit was generated by cvs2svn to compensate for changes in r2,
...
which included commits to RCS files with non-trunk default branches.
2000-02-16 17:32:49 +00:00