| 1 |
CHANGES for cgihtml |
| 2 |
$Id: CHANGES,v 1.1 2001-10-23 19:08:20 smm Exp $ |
| 3 |
=================== |
| 4 |
|
| 5 |
1.68 -> 1.69 |
| 6 |
------------ |
| 7 |
o Plugged memory leaks in list_clear(). |
| 8 |
|
| 9 |
o Allowed read_cgi_input() to have a NULL QUERY_STRING when using |
| 10 |
the GET method (It will return 0 instead of exiting). |
| 11 |
|
| 12 |
o Added explicit casts to realloc() calls. |
| 13 |
|
| 14 |
o Fixed replace_ltgt() to check if string is null. |
| 15 |
|
| 16 |
o Made parse_form_encoded() more robust. |
| 17 |
|
| 18 |
o Documentation now available in both HTML and text form. |
| 19 |
|
| 20 |
1.67 -> 1.68 |
| 21 |
------------ |
| 22 |
o Fixed double free bug (again). |
| 23 |
|
| 24 |
o Made cgihtml C++ friendly. Renamed variables called "new". Made |
| 25 |
implicit casts explicit. |
| 26 |
|
| 27 |
1.66 -> 1.67 |
| 28 |
------------ |
| 29 |
o Fixed double free bug in parse_CGI_encoded(). |
| 30 |
|
| 31 |
o Plugged memory leaks in linked list routines. |
| 32 |
|
| 33 |
o Fixed several upload bugs. Windows versus UNIX servers. |
| 34 |
|
| 35 |
o Added conditional macros to include files |
| 36 |
|
| 37 |
1.65 -> 1.66 |
| 38 |
------------ |
| 39 |
o Finally replaced all \r\n with \n. To heck with standards. |
| 40 |
|
| 41 |
o Slightly modified Makefile to handle UPLOADDIR modifications |
| 42 |
properly. |
| 43 |
|
| 44 |
1.6 -> 1.65 |
| 45 |
----------- |
| 46 |
o Rewrote parse_CGI_encoded. Plugged some memory leaks, improved |
| 47 |
performance and robustness, and simply made it look better. Now |
| 48 |
returns -1 if the string is not properly encoded. Should be mostly |
| 49 |
transparent to most users. |
| 50 |
|
| 51 |
o Fixed Windows portability bug in parse_file_encoded. |
| 52 |
|
| 53 |
o Fixed parse_file_encoded support for Netscape's Windows browsers. |
| 54 |
|
| 55 |
o Changed functions in html-lib.c to use \n rather than \r\n if |
| 56 |
compiled under Windows. |
| 57 |
|
| 58 |
o Added HTTP_USER_AGENT macro to cgi-lib.h |
| 59 |
|
| 60 |
o Added lower_case() to string-lib.h. |
| 61 |
|
| 62 |
o Moved examples to a subdirectory. |
| 63 |
|
| 64 |
o Modified Makefiles. |
| 65 |
|
| 66 |
1.51 -> 1.6 |
| 67 |
----------- |
| 68 |
o Fixed newstr() to properly handle failed malloc. |
| 69 |
|
| 70 |
o Removed die() function and signal() calls in example programs. Was |
| 71 |
causing confusion amongst non-UNIX users. |
| 72 |
|
| 73 |
o Fixed print_cgi_env(). |
| 74 |
|
| 75 |
o Added is_field_exists() and is_field_empty(). |
| 76 |
|
| 77 |
o Fixed bug in mail.cgi.c so that it allocates correctly for |
| 78 |
destination string. |
| 79 |
|
| 80 |
o File upload now puts filename in linked list. |
| 81 |
|
| 82 |
o Fixed buffer problems in file upload. Now allocates buffers |
| 83 |
correctly, and handles non-file information correctly as well. |
| 84 |
|
| 85 |
o Fixed minor bug in file upload that would lose the first line of |
| 86 |
information. |
| 87 |
|
| 88 |
o Added set_cookie() in html-lib.c. |
| 89 |
|
| 90 |
o Modified parse_cgi_encoded() to ignore all input if there is no |
| 91 |
equals sign in the string. |
| 92 |
|
| 93 |
o Fixed bug in parse_cgi_encoded(); would not return proper value if |
| 94 |
input string had one field with no value. |
| 95 |
|
| 96 |
o Added parse_cookies() to cgi-lib.c. |
| 97 |
|
| 98 |
1.5 -> 1.51 |
| 99 |
----------- |
| 100 |
o Got rid of h() and img() from html-lib.h because var_arg was causing |
| 101 |
trouble. Specifically, I couldn't figure out a good, consistent way |
| 102 |
of determining when the end of the argument list was reached without |
| 103 |
the user specifying it. |
| 104 |
|
| 105 |
o Fixed stupid type in Makefile: gnore.cgi -> ignore.cgi. |
| 106 |
|
| 107 |
o Internal change: Changed all the (*var).structvar (a relic from my |
| 108 |
Pascal programming days) to var->structvar. |
| 109 |
|
| 110 |
1.21 -> 1.5 |
| 111 |
----------- |
| 112 |
o Added an interactive debugging mode for interactive form entry from |
| 113 |
the command line. |
| 114 |
|
| 115 |
o read_cgi_input() now supports file upload! |
| 116 |
|
| 117 |
o Renames llist.h -> cgi-llist.h. This is to prevent conflicts with |
| 118 |
other linked list packages you may be using. |
| 119 |
|
| 120 |
o Added cgi_name() and cgi_name_multi(), counterparts to cgi_val() and |
| 121 |
cgi_val_multi(). |
| 122 |
|
| 123 |
o Added var_arg functionality to some HTML functions in html-lib.h. |
| 124 |
See documentation for examples. |
| 125 |
|
| 126 |
o h1() .. h6() replaced by more general h(). See documentation for |
| 127 |
usage. |
| 128 |
|
| 129 |
o Added the following new functions: |
| 130 |
|
| 131 |
html-lib.h cgi-lib.h string-lib.h |
| 132 |
---------- --------- ------------ |
| 133 |
img() cgi_name() substr() |
| 134 |
hidden() cgi_name_multi() |
| 135 |
is_form_empty() |
| 136 |
|
| 137 |
See documentation for more details. |
| 138 |
|
| 139 |
o Modularized read_cgi_input() and improved robustness. |
| 140 |
|
| 141 |
o Moved replace_ltg() from cgi-lib.c to string-lib.c. Made it |
| 142 |
available via string-lib.h. |
| 143 |
|
| 144 |
o <malloc.h> should have been <stdlib.h>. Thanks to Dan Fetzer |
| 145 |
<[email protected]> for pointing this out. |
| 146 |
|
| 147 |
o Got rid of extra \r in print_entries(). |
| 148 |
|
| 149 |
o Fixed minor bug in Makefile (nph-ignore becomes ignore). |
| 150 |
|
| 151 |
1.2 -> 1.21 |
| 152 |
----------- |
| 153 |
|
| 154 |
o Fixed bug that prevented die() from being compiled. Thanks to |
| 155 |
Rosemary Paquola <[email protected]> for the bug fix. |
| 156 |
|
| 157 |
1.1 -> 1.2 |
| 158 |
---------- |
| 159 |
o Rewrote parsing functions for read_cgi_input(). No longer uses |
| 160 |
messy NCSA code (except for unescape_url()). Improved robustness. |
| 161 |
|
| 162 |
o Defined macros for the standard CGI environment variables. |
| 163 |
|
| 164 |
o Added cgi_val_multi to deal with multiple values with the same |
| 165 |
name. Contributed by Mitch Garnaat <[email protected]> and |
| 166 |
modified by yours truly. |
| 167 |
|
| 168 |
o Strengthened escape_input(). Now escapes all non-alphanumeric |
| 169 |
characters. |
| 170 |
|
| 171 |
o Modified print_entries() to replace greater than (>) and less than |
| 172 |
(<) characters with the appropriate escaped HTML (> and < |
| 173 |
respectively). |
| 174 |
|
| 175 |
o Modified some functions for portability to NT. Thanks to Eliot Muir |
| 176 |
<[email protected]> for patches. |
| 177 |
|
| 178 |
o Added test.cgi example application. |
| 179 |
|
| 180 |
o Replaced nph-ignore.cgi.c with ignore.cgi.c. Uses a status header |
| 181 |
rather than no-parse-header. |
| 182 |
|
| 183 |
o Added status(), pragma(), print_env_cgi() functions. |
| 184 |
|
| 185 |
o Removed no_parse_header() function. |
| 186 |
|
| 187 |
o Changed int die() to void die(). Thanks to Graham Potts |
| 188 |
<[email protected]> for the report. |
| 189 |
|
| 190 |
o Removed carriage returns (\r) from HTML functions. Unnecessary; |
| 191 |
carriage returns are only required in the HTTP headers. |
| 192 |
|
| 193 |
o Fixed stupid bug in h2() .. h6(). Thanks to Andrea Cozzolino |
| 194 |
<[email protected]> for reporting this. |
| 195 |
|
| 196 |
o Updated documentation. |
| 197 |
|
| 198 |
1.0 -> 1.1 |
| 199 |
---------- |
| 200 |
|
| 201 |
o Renamed functions to use a more standard naming scheme. This will |
| 202 |
break old programs; make sure you search and replace to rename the |
| 203 |
appropriate functions. |
| 204 |
|
| 205 |
Old function name New function name |
| 206 |
----------------- ----------------- |
| 207 |
ReadParse read_cgi_input |
| 208 |
val cgi_val |
| 209 |
PrintHeader html_header |
| 210 |
MethodGet method_get |
| 211 |
PrintEntries print_entries |
| 212 |
|
| 213 |
o read_cgi_input now returns a 1 if input is received, and a 0 otherwise. |
| 214 |
ReadParse in version 1.0 did just the opposite. |
| 215 |
|
| 216 |
o Used dynamically allocated strings rather than arrays of characters. |
| 217 |
There is now no theoretical limit to the size of item.name or item.value. |
| 218 |
|
| 219 |
o Added string-lib library: |
| 220 |
- newstr() |
| 221 |
|
| 222 |
o New cgi-lib functions: |
| 223 |
|
| 224 |
- accept_images() -- determines whether the client browser will |
| 225 |
accept images. |
| 226 |
- escape_input() -- filter out shell metacharacters for security |
| 227 |
purposes |
| 228 |
|
| 229 |
o New html-lib functions: |
| 230 |
|
| 231 |
- mime_header() |
| 232 |
- no_parse_header() |
| 233 |
- show_html_page() |
| 234 |
- h1() ... h6() |
| 235 |
|
| 236 |
o Added two new example programs: index-sample.cgi and nph-ignore.cgi |
| 237 |
|
| 238 |
o Removed example: mailform.cgi |
| 239 |
|
| 240 |
o Included debug-cgi.sh, a shell script which runs CGI programs from |
| 241 |
the command line to help debug code. |
| 242 |
|