Commit Graph

117 Commits

Author SHA1 Message Date
Sascha Schumann
65b9a40640 fix sizeof(size_t) > sizeof(uint) issue 2003-03-11 02:28:46 +00:00
Sascha Schumann
dfb0d70b5b reverting jani's non-sense commits 2003-03-11 01:47:06 +00:00
foobar
7a1ecedf85 64bit issue fixed 2003-03-10 22:59:34 +00:00
Ilia Alshanetsky
e1802d7228 Fixed bug #22048 (incorrect insertion of session id when tabs are used to
separate tag elements).
2003-02-12 14:56:13 +00:00
Sascha Schumann
aa9bb5aefa Fix my stupid mistake which broke <form> handling 2002-09-30 04:56:38 +00:00
Sascha Schumann
41c0b43772 Allow - as part of an attribute
PR: #19573
2002-09-25 12:15:22 +00:00
Sascha Schumann
7af64ef531 Fix #13472 by making it possible to append the <input> stuff after
<fieldset> for xhtml compliance.
2002-09-25 11:06:24 +00:00
Sascha Schumann
3cadecec1b Allow malformed HTML such as
<a onClick=window.open("/hardware/somevar.php?hinfoid=","chgti") ..>

where ["'] are part of the attribute value.
2002-09-25 10:35:28 +00:00
Marcus Boerger
7bd7e14e4c Changed handling of output buffer sizes.
#.c to follow
2002-08-20 20:01:14 +00:00
Marcus Boerger
21903dfc7e corrected handling of internal output buffers
minor fixs
2002-08-10 16:12:36 +00:00
Thies C. Arntzen
5a0c283700 fix leak 2002-06-29 11:13:03 +00:00
Thies C. Arntzen
23251ebd1a re-add accidentily nuked session_adapt_url() 2002-05-05 16:39:49 +00:00
Sascha Schumann
c8f884fac8 the output buffer is flushed during request shutdown before it
reaches our rshutdown, so it is safe to delete the contents of
the url rewriter variables here.
2002-05-05 02:07:16 +00:00
Sascha Schumann
9743860d35 simplify handling of variables by maintaining two strings which
are simply appended instead of traversing the hash table on each
URL/form.

also fix an unconditional segfault in rshutdown due to efree'ing
a static char *.

remove remove_var, add reset_vars.  move the function declarations
into the right header file.
2002-05-04 18:33:13 +00:00
Sascha Schumann
2a4dea6c18 include url.h to pull in declaration of php_url_encode 2002-05-04 17:14:56 +00:00
Thies C. Arntzen
9712a4b3c8 @ - Added output_add_rewrite_var() and output_remove_rewrite_var() to inject
@   and remove variables from the URL-Rewriter. (thies)
i have also modified the session module to use this - so it doesn't
need to fiddle with the output-system any more
2002-05-03 08:00:41 +00:00
Thies C. Arntzen
42158ef7c8 revert session_set_userdata - diffent patch will come shortly 2002-04-28 11:45:45 +00:00
Thies C. Arntzen
eb105693b8 @ - added session_set_userdata() which enables you to specify one variable
@   that will be kept in the browser in addition to the session-id. This
@   only works when using trans-sid sessions (no cookie). (thies)
2002-04-27 14:07:52 +00:00
jim winstead
bc977dd195 Do not add redundant id attribute. It doesn't make the output any
more standards compliant.
2002-04-25 22:12:38 +00:00
Derick Rethans
4a834dfa44 - Fix for bug 16810 (XHTML compliance) 2002-04-25 06:30:09 +00:00
Sascha Schumann
5428e463bd If an argument (<tag val=argument..) was not quoted, leave it that way. 2002-03-26 10:23:33 +00:00
Sascha Schumann
cd5f8608e2 Restore use of inline 2002-03-04 08:37:44 +00:00
Derick Rethans
8b5411b938 - Fix for Sun WorkShop 6 update 2 compiler (Bug #15812) 2002-03-01 16:52:16 +00:00
Sebastian Bergmann
90613d2282 Maintain headers. 2002-02-28 08:29:35 +00:00
Sebastian Bergmann
38933514e1 Update headers. 2001-12-11 15:32:16 +00:00
Sascha Schumann
4c69a970d3 Remove some unused variables 2001-09-11 07:52:55 +00:00
Sascha Schumann
2bbbec107b A round of "d'ohs" for me, please.
We must not stop scanning after finding a "?", because we
need the information regarding the "#".
2001-09-10 11:22:43 +00:00
Sascha Schumann
de963ce9c6 Better fix for mark problem 2001-09-09 14:52:39 +00:00
Sascha Schumann
c86c9f52b4 Fix mark-handling 2001-09-09 14:38:12 +00:00
Zeev Suraski
b781720b36 More fixes and refinements 2001-08-27 00:23:55 +00:00
Zeev Suraski
d697a558ac Fix my session updates.
trans_sid handling will no longer slow down performance unless a session
is actually in use.
2001-08-26 11:49:43 +00:00
Zeev Suraski
b8763a6f8c Get rid of TRANS_SID - it's always possible to use it now. 2001-08-25 16:09:23 +00:00
Zeev Suraski
13ff183225 Move the trans-sid mechanism to use the output buffering mechanism.
Advantages:
- Would work with the output buffering mechanism in general, and with
  output compression in particular
- Should yield better performance (untested as of yet)
2001-08-25 15:57:42 +00:00
Sascha Schumann
480ffb3d75 more tsrm cleanup 2001-08-05 16:43:57 +00:00
Zeev Suraski
d87cc976e1 Redesigned thread safety mechanism - nua nua 2001-07-28 11:36:37 +00:00
Sascha Schumann
ef13ab5750 Improve url scanner speed (up to 40% for large chunks of data)
and handle some corner cases better.  The scanner has been changed
to the format as proposed in "RE2C - A More Versatile Scanner Generator"
by Cowan et al.
2001-07-04 15:30:21 +00:00
foobar
c34d2b91da Added new configuration directives:
arg_separator.input and arg_separator.output
2001-04-04 20:46:26 +00:00
Andi Gutmans
eb6ba01d1c - Fix copyright notices with 2001 2001-02-26 06:11:02 +00:00
Sascha Schumann
7eb8469679 Avoid possible memory leak in the URL scanner, if the connection is
interrupted during writing the output.
2001-01-09 16:45:19 +00:00
Chuck Hagenbuch
ba114dc997 Make the generated <input> lower case and terminated with a /,
to be xhtml-compliant.
2001-01-02 20:39:27 +00:00
Sascha Schumann
0b194cbca6 Support multi-char arg separators.
PR: #8274
2000-12-22 22:52:11 +00:00
Sascha Schumann
b97e23c4a8 Pass core_globals to new inline functions
Submitted by: Sebastian Bergmann
2000-12-05 11:05:24 +00:00
Sascha Schumann
911abe100a Move code from macros to inline functions to ease debugging 2000-12-04 12:26:53 +00:00
Sascha Schumann
5767ab3f75 Reset the state, if there is garbage in an HTML tag.
PR: #7854
2000-11-17 16:27:37 +00:00
foobar
648c141cbc Validators are happy now. 2000-11-01 22:53:42 +00:00
Sascha Schumann
c57830c1d2 Reinstantiate single quotes properly.
Add url_adapt_single_url() API which modifies a single URL. Might be used
to modify the Location: URL.
2000-10-26 18:05:47 +00:00
Sascha Schumann
1d9acd8337 Hack for #7262, not fixed yet 2000-10-19 17:40:56 +00:00
Sascha Schumann
d95bc9b3eb Initialize tags properly.
Submitted by: Andreas Karajannis <Andreas.Karajannis@gmd.de>
2000-10-17 14:17:21 +00:00
Sascha Schumann
2d24f03033 Back out ws changes 2000-10-17 03:02:47 +00:00
Daniel Beulshausen
1f245a6f73 make compile again 2000-10-16 20:08:27 +00:00
Sascha Schumann
1c85ad029b Enable users to set the HTML tags to rewrite
through a configuration directive
2000-10-16 17:25:36 +00:00
Sascha Schumann
5674f1be45 Ignore close tags and use unsigned char type. 2000-10-04 18:06:20 +00:00
Sascha Schumann
3823ad3ec0 Recognize single quotes around cdata.
Move smart_str functions to an extra file.
2000-09-27 15:26:39 +00:00
Sascha Schumann
7db874096e Unify memory allocation in smart_str functions 2000-09-26 11:00:39 +00:00
Sascha Schumann
854c0622f0 Cleanup SCANNER_DEBUG and don't NUL terminate work buffer 2000-09-20 08:59:52 +00:00
Sascha Schumann
cfa22547e0 Use emalloc and friends. Since we reuse all buffers, this does not affect
the speed.

The smart_str_* functions don't NUL terminate strings anymore. We can
rely on the length of the strings completely.
2000-09-20 08:40:33 +00:00
Sascha Schumann
16d7cb88fa Remove this pseudo optimization from the previous rewrite.
Since we leave/enter the loop more often, the cost of maintaining
c_arg/c_val is higher than simply copying the tag/arg string once.
2000-09-20 08:13:45 +00:00
Sascha Schumann
f27f790f29 Another 5%-10% speed increase achieved by
- making ctx->val read-only
- adding a special appendc function for appending single characters
2000-09-20 08:06:01 +00:00
Sascha Schumann
7aa23d3ca3 Add support for URLs containing NAME info (for scrolling; #name). 2000-09-20 02:04:19 +00:00
Sascha Schumann
a2dc8a2fa5 2nd Rewrite of the main scanner engine. This version is cleaner and faster.
It handles the following tags currently:

<FRAME .. SRC=URL ..>
<INPUT .. TYPE=IMAGE SRC=URL ..>
<A     .. HREF=URL ..>
<AREA  .. HREF=URL ..>
<IMG   .. SRC=URL ..>

Additional ones can be added within seconds.

The support for HTML forms has been significantly improved. The scanner
will now add proper Hidden Fields for the Session ID.
2000-09-20 01:15:10 +00:00
Sascha Schumann
cc53ad5166 Reduce the amount of copying in the mainloop. We copy tag/arg only, if we
need to preserve them for a new loop iteration (after we leave mainloop).
Otherwise, we can just let them point to the work area.
2000-09-19 20:19:03 +00:00
Sascha Schumann
dd59d14805 Revert part of last commit. I'll refine it later. 2000-09-19 19:18:41 +00:00
Sascha Schumann
a7ef1966ac Another speedup by avoiding string copies.
15% speed gain in test case (rewriting 1M URLs).
2000-09-19 18:17:28 +00:00
Sascha Schumann
95ae21ff1b Remove nextiter label 2000-09-19 18:01:29 +00:00
Sascha Schumann
7f86b7224c s/DEBUG/SCANNER_DEBUG/. "Convert" one macro to inline function to be more
consistent. Also use continue.
2000-09-19 18:00:58 +00:00
Zeev Suraski
5b0ca1585a Fix a few build bugs, still no go 2000-09-19 17:53:09 +00:00
Sascha Schumann
4b3fb7b05e Add new URL scanner. This version is up to 20% faster. It will be
enabled by default once I'm sure that it works in every case.

To enable it, apply s/url_adapt_ext/url_adapt_ext_ex/ to session.c
2000-09-19 17:32:27 +00:00