Commit Graph

68 Commits

Author SHA1 Message Date
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