infodrom/cgilib
6 years agoFix parsing empty QUERY_STRING master
Petr Písař [Sun, 20 Aug 2017 20:15:25 +0000 (22:15 +0200)]
Fix parsing empty QUERY_STRING

If an CGI script is requested vith GET method without any query parameters,
the QUERY_STRING environment value will be an empty string. The old code
reported an error in this case by returning NULL from cgiInit(). This
patch fixes it.

This patch also fixes a memory leak in cgiReadVariables(). The query
string duplicated into line variable was never deallocated. This is
fixed now. Actually in any error raised from cgiReadVariables() forgets
to deallocted line and other variables but since it's an error state for
short-time living CGI script I did not bother fixing them.

6 years agoFix memory leaks found by valgrind
Michel Stam [Sun, 4 May 2014 20:28:50 +0000 (22:28 +0200)]
Fix memory leaks found by valgrind

9 years agoMemset improvement inspired by Michael Rayment <mtr@mun.ca>
Joey Schulze [Mon, 5 May 2014 11:54:55 +0000 (13:54 +0200)]
Memset improvement inspired by Michael Rayment <mtr@mun.ca>

14 years agoTerminate a freshly allocated string as well.
Joey Schulze [Wed, 1 Jul 2009 16:05:14 +0000 (16:05 +0000)]
Terminate a freshly allocated string as well.

14 years agoCorrect header creation. Ensure the new string contains enough NUL bytes.
Joey Schulze [Wed, 1 Jul 2009 16:03:02 +0000 (16:03 +0000)]
Correct header creation.  Ensure the new string contains enough NUL bytes.
Thanks to Tyler McHenry

14 years agoRemove spurious extern, thanks to Tyler McHenry
Joey Schulze [Tue, 30 Jun 2009 20:57:20 +0000 (20:57 +0000)]
Remove spurious extern, thanks to Tyler McHenry

15 years agoFinalise changelog cgilib_0-7
Joey Schulze [Sun, 8 Feb 2009 17:12:53 +0000 (17:12 +0000)]
Finalise changelog

15 years agoPreparation for new release 0.7
Joey Schulze [Sun, 8 Feb 2009 17:10:39 +0000 (17:10 +0000)]
Preparation for new release 0.7

15 years agoABI version needs to be higher than 0 for Debian packaging
Joey Schulze [Sun, 8 Feb 2009 16:55:41 +0000 (16:55 +0000)]
ABI version needs to be higher than 0 for Debian packaging

15 years agoNeed to copy files before distribution, symlinks are bad
Joey Schulze [Sun, 8 Feb 2009 14:13:57 +0000 (14:13 +0000)]
Need to copy files before distribution, symlinks are bad

15 years agoNo config directory anymore
Joey Schulze [Sun, 8 Feb 2009 14:03:50 +0000 (14:03 +0000)]
No config directory anymore

15 years agoAdd SONAME information
Joey Schulze [Sat, 7 Feb 2009 13:31:43 +0000 (13:31 +0000)]
Add SONAME information

15 years agoUntypo
Joey Schulze [Mon, 12 Jan 2009 08:13:21 +0000 (08:13 +0000)]
Untypo

15 years agoPatch by W. Michael Petullo to use autotools for strncpy()
Joey Schulze [Sun, 11 Jan 2009 21:59:16 +0000 (21:59 +0000)]
Patch by W. Michael Petullo to use autotools for strncpy()

15 years agoSwitch to autotools: readme renamed into README
Joey Schulze [Sun, 11 Jan 2009 21:12:58 +0000 (21:12 +0000)]
Switch to autotools: readme renamed into README

15 years agoSwitch to autotools: CREDITS renamed into AUTHORS
Joey Schulze [Sun, 11 Jan 2009 21:08:42 +0000 (21:08 +0000)]
Switch to autotools: CREDITS renamed into AUTHORS

15 years agoSwitch to autotools: CHANGES renamed into ChangeLog
Joey Schulze [Sun, 11 Jan 2009 21:07:12 +0000 (21:07 +0000)]
Switch to autotools: CHANGES renamed into ChangeLog

15 years agoAdd a headline
Joey Schulze [Sun, 11 Jan 2009 20:49:41 +0000 (20:49 +0000)]
Add a headline

15 years agoConvert to autotools
Joey Schulze [Sun, 11 Jan 2009 20:27:31 +0000 (20:27 +0000)]
Convert to autotools

15 years agoPrepare for autotools
Joey Schulze [Sun, 11 Jan 2009 20:09:37 +0000 (20:09 +0000)]
Prepare for autotools

15 years agoPrepare for autotools
Joey Schulze [Sun, 11 Jan 2009 20:00:14 +0000 (20:00 +0000)]
Prepare for autotools

15 years agoAdd Phil Brooke to list of contributors
Joey Schulze [Sun, 16 Nov 2008 19:25:13 +0000 (19:25 +0000)]
Add Phil Brooke to list of contributors

15 years agoPatch by Phil Brooke <pjb@scm.tees.ac.uk> to allow cookies without
Joey Schulze [Sun, 16 Nov 2008 19:23:29 +0000 (19:23 +0000)]
Patch by Phil Brooke <pjb@scm.tees.ac.uk> to allow cookies without
regular CGI POST/GET variables

16 years agoRemoved reference to www.infodrom.north.de cgilib_0-6
Joey Schulze [Sun, 6 Apr 2008 12:45:54 +0000 (12:45 +0000)]
Removed reference to www.infodrom.north.de

16 years agoAdd CVS information
Joey Schulze [Sun, 6 Apr 2008 09:54:00 +0000 (09:54 +0000)]
Add CVS information

16 years agoDocument changes
Joey Schulze [Sun, 6 Apr 2008 09:51:29 +0000 (09:51 +0000)]
Document changes

16 years agoAdd the GPLv2 itself
Joey Schulze [Sun, 6 Apr 2008 09:43:53 +0000 (09:43 +0000)]
Add the GPLv2 itself

16 years agoUpdate to the new FSF address
Joey Schulze [Sun, 6 Apr 2008 09:43:43 +0000 (09:43 +0000)]
Update to the new FSF address

16 years agoUpdates
Joey Schulze [Sun, 6 Apr 2008 09:33:05 +0000 (09:33 +0000)]
Updates

16 years agoAdjust the date to today
Joey Schulze [Sun, 6 Apr 2008 09:16:46 +0000 (09:16 +0000)]
Adjust the date to today

16 years agoBeautification
Joey Schulze [Fri, 8 Feb 2008 10:36:20 +0000 (10:36 +0000)]
Beautification

16 years agoNeed to decode variable names as well, and consistently the content
Joey Schulze [Mon, 21 Jan 2008 20:39:41 +0000 (20:39 +0000)]
Need to decode variable names as well, and consistently the content

16 years agoUntypo
Joey Schulze [Mon, 21 Jan 2008 19:52:47 +0000 (19:52 +0000)]
Untypo

16 years agoImprovement by Neil Spring: Declare some arguments const
Joey Schulze [Mon, 21 Jan 2008 10:52:36 +0000 (10:52 +0000)]
Improvement by Neil Spring: Declare some arguments const

16 years agoAdded support for inclusion into C++
Joey Schulze [Mon, 21 Jan 2008 10:41:49 +0000 (10:41 +0000)]
Added support for inclusion into C++

16 years agoSupport for uploaded files, beautification of the output, improved
Joey Schulze [Sun, 20 Jan 2008 19:04:03 +0000 (19:04 +0000)]
Support for uploaded files, beautification of the output, improved
HTML, more examples

16 years agoSmall improvements
Joey Schulze [Mon, 17 Dec 2007 16:00:51 +0000 (16:00 +0000)]
Small improvements

16 years ago-lcgi not required in local directory
Joey Schulze [Sun, 16 Dec 2007 16:40:43 +0000 (16:40 +0000)]
-lcgi not required in local directory

16 years agoUpdates
Joey Schulze [Sun, 16 Dec 2007 16:40:23 +0000 (16:40 +0000)]
Updates

16 years agoRefer to freeing memory
Joey Schulze [Sun, 16 Dec 2007 16:39:01 +0000 (16:39 +0000)]
Refer to freeing memory

16 years agoDocument cgiFree
Joey Schulze [Fri, 14 Dec 2007 15:58:01 +0000 (15:58 +0000)]
Document cgiFree

16 years agoRemove temporary files at the end
Joey Schulze [Fri, 14 Dec 2007 15:39:50 +0000 (15:39 +0000)]
Remove temporary files at the end

16 years agoBugfix
Joey Schulze [Fri, 14 Dec 2007 15:09:09 +0000 (15:09 +0000)]
Bugfix

16 years agoAdded documentation
Joey Schulze [Fri, 14 Dec 2007 15:01:55 +0000 (15:01 +0000)]
Added documentation

16 years agoSupport functions for transmitted files
Joey Schulze [Thu, 13 Dec 2007 18:44:33 +0000 (18:44 +0000)]
Support functions for transmitted files

16 years agoHint freeing memory
Joey Schulze [Fri, 7 Dec 2007 16:30:40 +0000 (16:30 +0000)]
Hint freeing memory

16 years agofree CGI data structures
Joey Schulze [Fri, 7 Dec 2007 15:08:51 +0000 (15:08 +0000)]
free CGI data structures

16 years agotext update
Joey Schulze [Fri, 7 Dec 2007 14:49:52 +0000 (14:49 +0000)]
text update

16 years agomemory correction
Joey Schulze [Thu, 6 Dec 2007 18:35:47 +0000 (18:35 +0000)]
memory correction

16 years agoUse cgiFreeList to free the list
Joey Schulze [Thu, 6 Dec 2007 18:32:45 +0000 (18:32 +0000)]
Use cgiFreeList to free the list

16 years agoindention
Joey Schulze [Thu, 6 Dec 2007 17:11:17 +0000 (17:11 +0000)]
indention

16 years agoAdded new reference
Joey Schulze [Wed, 5 Dec 2007 20:10:22 +0000 (20:10 +0000)]
Added new reference

16 years agoAdd cgiGetFiles to list functions
Joey Schulze [Wed, 5 Dec 2007 19:52:12 +0000 (19:52 +0000)]
Add cgiGetFiles to list functions

16 years agoDocument cgiGetFiles
Joey Schulze [Wed, 5 Dec 2007 19:48:34 +0000 (19:48 +0000)]
Document cgiGetFiles

16 years agoUntypo
Joey Schulze [Wed, 5 Dec 2007 19:44:25 +0000 (19:44 +0000)]
Untypo

16 years agoImproved output
Joey Schulze [Sun, 2 Dec 2007 22:27:01 +0000 (22:27 +0000)]
Improved output

16 years agoAdded support for uploaded files to the input parser
Joey Schulze [Sun, 2 Dec 2007 22:25:15 +0000 (22:25 +0000)]
Added support for uploaded files to the input parser

16 years agoFree all allocated space
Joey Schulze [Sun, 2 Dec 2007 22:23:47 +0000 (22:23 +0000)]
Free all allocated space

16 years agoDon't abuse variables
Joey Schulze [Sun, 2 Dec 2007 22:22:01 +0000 (22:22 +0000)]
Don't abuse variables

16 years agoBe less verbose
Joey Schulze [Sun, 2 Dec 2007 22:19:42 +0000 (22:19 +0000)]
Be less verbose

16 years agofree type if set
Joey Schulze [Sun, 2 Dec 2007 22:19:22 +0000 (22:19 +0000)]
free type if set

16 years agoCorrected pointer arithmetic
Joey Schulze [Sun, 2 Dec 2007 22:13:58 +0000 (22:13 +0000)]
Corrected pointer arithmetic

16 years agoParse function need to return the s_cgi structure in preparation of
Joey Schulze [Sun, 2 Dec 2007 22:05:44 +0000 (22:05 +0000)]
Parse function need to return the s_cgi structure in preparation of
file upload support

16 years agodata structure for uploaded files
Joey Schulze [Sun, 2 Dec 2007 21:48:26 +0000 (21:48 +0000)]
data structure for uploaded files

16 years agoAdjust verbosity
Joey Schulze [Thu, 29 Nov 2007 15:13:02 +0000 (15:13 +0000)]
Adjust verbosity

16 years agoDocument basic support for multipart/form-data
Joey Schulze [Thu, 29 Nov 2007 14:16:58 +0000 (14:16 +0000)]
Document basic support for multipart/form-data

16 years agoAdded basic support for multipart/form-data
Joey Schulze [Thu, 29 Nov 2007 13:58:25 +0000 (13:58 +0000)]
Added basic support for multipart/form-data

16 years agoAdded internal routine to read input
Joey Schulze [Thu, 29 Nov 2007 13:54:27 +0000 (13:54 +0000)]
Added internal routine to read input

16 years agoAppend newline after each log line on stderr
Joey Schulze [Wed, 28 Nov 2007 14:06:34 +0000 (14:06 +0000)]
Append newline after each log line on stderr

16 years agoA newline will be appended on demand when debug output is emitted
Joey Schulze [Wed, 28 Nov 2007 14:05:01 +0000 (14:05 +0000)]
A newline will be appended on demand when debug output is emitted

16 years agoDon't trust Content-Length too much
Joey Schulze [Wed, 28 Nov 2007 13:59:22 +0000 (13:59 +0000)]
Don't trust Content-Length too much

16 years agoInclude syslog header
Joey Schulze [Tue, 27 Nov 2007 18:45:29 +0000 (18:45 +0000)]
Include syslog header

16 years agoOpen the channel to syslog if needed
Joey Schulze [Tue, 27 Nov 2007 18:16:49 +0000 (18:16 +0000)]
Open the channel to syslog if needed

16 years agoDocumentation update
Joey Schulze [Tue, 27 Nov 2007 18:02:27 +0000 (18:02 +0000)]
Documentation update

16 years agoRestructurisation: moved debug code into general routine, and into aux file
Joey Schulze [Tue, 27 Nov 2007 18:01:27 +0000 (18:01 +0000)]
Restructurisation: moved debug code into general routine, and into aux file

16 years agoDemonstrate GET variables
Joey Schulze [Sun, 25 Nov 2007 21:19:50 +0000 (21:19 +0000)]
Demonstrate GET variables

16 years agoUpdated URLs
Joey Schulze [Sun, 25 Nov 2007 21:12:25 +0000 (21:12 +0000)]
Updated URLs

16 years agoRemoved included changelog
Joey Schulze [Sun, 25 Nov 2007 21:04:48 +0000 (21:04 +0000)]
Removed included changelog

16 years agoTake care of null termination
Joey Schulze [Sun, 25 Nov 2007 19:16:11 +0000 (19:16 +0000)]
Take care of null termination

16 years agoSimplify and unify code
Joey Schulze [Sun, 25 Nov 2007 19:09:56 +0000 (19:09 +0000)]
Simplify and unify code

16 years agoUse \r\n in headers
Joey Schulze [Sun, 25 Nov 2007 19:09:24 +0000 (19:09 +0000)]
Use \r\n in headers

16 years agoUse \r\n in headers
Joey Schulze [Sun, 25 Nov 2007 18:55:03 +0000 (18:55 +0000)]
Use \r\n in headers

16 years ago<malloc.h> is obsolete, use <stdlib.h>
Joey Schulze [Sun, 25 Nov 2007 18:34:18 +0000 (18:34 +0000)]
<malloc.h> is obsolete, use <stdlib.h>

16 years agoSpelling corrections by Stephen Uitti
Joey Schulze [Sun, 25 Nov 2007 18:32:13 +0000 (18:32 +0000)]
Spelling corrections by Stephen Uitti

16 years agoProperly return NULL when the variable is empty
Joey Schulze [Sun, 25 Nov 2007 18:03:36 +0000 (18:03 +0000)]
Properly return NULL when the variable is empty

16 years agoNew contributor
Joey Schulze [Sun, 25 Nov 2007 16:41:17 +0000 (16:41 +0000)]
New contributor

16 years agoPatch by Laszlo Zavaleta <wry@kopu.org> to accept ';' as delimiter
Joey Schulze [Sun, 25 Nov 2007 16:17:54 +0000 (16:17 +0000)]
Patch by Laszlo Zavaleta <wry@kopu.org> to accept ';' as delimiter

16 years agoEscape potentially characters
Joey Schulze [Sun, 25 Nov 2007 16:04:51 +0000 (16:04 +0000)]
Escape potentially characters

16 years agoAdded auxilliary routines
Joey Schulze [Sun, 25 Nov 2007 16:04:28 +0000 (16:04 +0000)]
Added auxilliary routines

16 years agoDocumentation
Joey Schulze [Sun, 25 Nov 2007 15:58:51 +0000 (15:58 +0000)]
Documentation

16 years agoAuxilliary routines
Joey Schulze [Sun, 25 Nov 2007 15:46:53 +0000 (15:46 +0000)]
Auxilliary routines

16 years agoAdjust the mail address
Joey Schulze [Sun, 25 Nov 2007 15:39:53 +0000 (15:39 +0000)]
Adjust the mail address

18 years agoAdded missing include file for strcmp() and strlen()
Joey Schulze [Tue, 3 May 2005 03:38:50 +0000 (03:38 +0000)]
Added missing include file for strcmp() and strlen()

22 years ago * Darn, f*cking DEB_BUILD_OPTIONS support broke the build system. Found
Joey Schulze [Fri, 14 Dec 2001 18:09:52 +0000 (18:09 +0000)]
  * Darn, f*cking DEB_BUILD_OPTIONS support broke the build system.  Found
    a way to workaround this by cheating but it seems to work this
    time.

22 years agoAdded convenience code to support $DEB_BUILD_OPTIONS
Joey Schulze [Thu, 22 Nov 2001 08:25:10 +0000 (08:25 +0000)]
Added convenience code to support $DEB_BUILD_OPTIONS

22 years agoUpdated addresses
Joey Schulze [Tue, 20 Nov 2001 21:14:50 +0000 (21:14 +0000)]
Updated addresses

24 years agotypo
Joey Schulze [Mon, 24 Apr 2000 16:07:22 +0000 (16:07 +0000)]
typo

24 years agoremoved misplaced quotes
Joey Schulze [Sat, 6 Nov 1999 12:09:37 +0000 (12:09 +0000)]
removed misplaced quotes

24 years ago . Added homepage to readme cgilib_0-5 debian_cgilib_0-5-1
Joey Schulze [Fri, 20 Aug 1999 21:32:32 +0000 (21:32 +0000)]
 . Added homepage to readme
 . Adjusted copyright file

24 years agoSet final dates
Joey Schulze [Fri, 20 Aug 1999 21:29:37 +0000 (21:29 +0000)]
Set final dates