infodrom/cgilib
2 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.

2 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

5 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>

10 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.

10 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

10 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

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

11 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

11 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

11 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

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

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

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

11 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()

11 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

11 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

11 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

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

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

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

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

11 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

11 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

12 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

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

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

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

12 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

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

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

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

12 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

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

12 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

12 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++

12 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

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

12 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

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

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

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

12 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

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

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

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

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

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

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

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

12 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

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

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

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

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

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

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

12 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

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

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

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

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

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

12 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

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

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

12 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

12 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

12 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

12 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

12 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

12 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

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

12 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

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

12 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

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

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

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

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

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

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

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

12 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>

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

12 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

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

12 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

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

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

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

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

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

14 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()

18 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.

18 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

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

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

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

20 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

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