IIRF v1.2.11b

Topics: Developer Forum, User Forum
Coordinator
Feb 24, 2007 at 2:19 AM
IIRF V1.2.11b has been released.
This marks the first release that has been made available via codeplex.com .
There are both source and binary archives available.
click the "Releases" tab on the IIRF site on codeplex to download.

Notable features, fixes, and functional updates for v1.2.11:

1. fixed a bug with handling of the pattern when dealing with $10 or above in replacement patterns. (skipping the second digit of the number).

2. Fixed a bug where old values of OriginalUrl and RequestMethod were hanging around in context. This fix involved re-working logic in onUrlMap (thanks to rdlejo).

3. included support for a new directive: RewriteFilterPriority, which sets the filter priority. Check the readme for details. This is helpful for sites that have PHP or other ISAPIs that require IIRF to be set to HIGH priority.

4. added support for including server variables in the replacement pattern for a RewriteRule. eg %{QUERY_STRING} in the replacement pattern embeds the query string into the output (rewritten) URL.

----

There is one other significant change for this version: the license has been updated. IIRF is now being released under the Microsoft Permissive License. You can check that out by ticking the License tab on the IIRF subsite on codeplex.com.

----
As always, I'd love to hear your feedback on this release.
Feb 26, 2007 at 10:10 PM
Generally good results:

1. New RewriteFilterPriority option works great! THANKS!!!
(Logging the priority level as a string instead of (or in addition to) the numerical constant would be more intuitive.)

2. Stability greatly improved over 1.2.10, which crashed repeatedly.

3. Initial -f and -d testing appear to work reliably. (I had unpredictable results before.)


I found one major issue though: Modifying the .ini file may cause IIRF to become unresponsive.

1. Restart IIS
2. Parses .ini file successfully
3. Begin processing URLs
4. Modify .ini file
5. Detects change in .ini file and attempts reparsing
6. Sometimes unsuccessful with this in log:
"Found 0 rules (0 failed) on 1 lines"
7. IIRF becomes unresponsive to URLs and further .ini changes
8. Full restart of IIS required to resume proper behavior

Note that this problem appears to happen only after THREAD_DETACH messages in the log file after being idle.


Here are the interesting portions of my log files:
Mon Feb 26 16:05:19 2007 - DllMain THREAD_DETACH, threadId= 828
Mon Feb 26 16:05:19 2007 - DllMain THREAD_DETACH, threadId= 316
Mon Feb 26 16:05:19 2007 - DllMain THREAD_DETACH, threadId= 856
Mon Feb 26 16:05:19 2007 - DllMain THREAD_DETACH, threadId= 2892
Mon Feb 26 16:05:44 2007 - DllMain THREAD_DETACH, threadId= 2492
Mon Feb 26 16:05:52 2007 - Detected change in the  ini file. . . 
Mon Feb 26 16:05:52 2007 - Ionic URL Rewriting ISAPI Filter v1.2.11b
Mon Feb 26 16:05:52 2007 - ReadConfig
Mon Feb 26 16:05:52 2007 - Done reading .ini file: Found 0 rules (0 failed) on 1 lines
Mon Feb 26 16:05:52 2007 - INFO: Re-using previous logfile because the ini file is suspisciously short.

After restarting IIS...
--------------------------------------------
Mon Feb 26 16:59:39 2007 - Read .ini file: setting LogLevel to 3
Mon Feb 26 16:59:39 2007 - Read .ini file: Filter Priority is now: 0x80000
Mon Feb 26 16:59:39 2007 - ini line  16: RewriteCond %{REQUEST_FILENAME}                            -f                                 
Mon Feb 26 16:59:39 2007 - ParseCondModifierFlags: '[OR]'
Mon Feb 26 16:59:39 2007 - ini line  17: RewriteCond %{REQUEST_FILENAME}                            -d                                 
Mon Feb 26 16:59:39 2007 - ini line  18: RewriteRule   1 ^(.*)$                                         $1                             
Mon Feb 26 16:59:39 2007 - ParseRuleModifierFlags: '[L]'
Mon Feb 26 16:59:39 2007 - ini line  22: RewriteCond %{REQUEST_FILENAME}                            !-f                                
Mon Feb 26 16:59:39 2007 - ini line  23: RewriteCond %{REQUEST_FILENAME}                            !-d                                
Mon Feb 26 16:59:39 2007 - ini line  24: RewriteCond E:\drupal5\%{URL}                              -f                                 
Mon Feb 26 16:59:39 2007 - ParseCondModifierFlags: '[OR]'
Mon Feb 26 16:59:39 2007 - ini line  25: RewriteCond E:\drupal5\%{URL}                              -d                                 
Mon Feb 26 16:59:39 2007 - ParseCondModifierFlags: '[OR]'
Mon Feb 26 16:59:39 2007 - ini line  26: RewriteRule   2 ^/(.*)$                                        /drupal5/$1                    
Mon Feb 26 16:59:39 2007 - ParseRuleModifierFlags: '[L]'
Mon Feb 26 16:59:39 2007 - ini line  29: RewriteCond %{REQUEST_FILENAME}                            !-f                                
Mon Feb 26 16:59:39 2007 - ini line  30: RewriteCond %{REQUEST_FILENAME}                            !-d                                
Mon Feb 26 16:59:39 2007 - ini line  31: RewriteCond E:\drupal5\%{URL}                              !-f                                
Mon Feb 26 16:59:39 2007 - ini line  32: RewriteCond E:\drupal5\%{URL}                              !-d                                
Mon Feb 26 16:59:39 2007 - ini line  33: RewriteRule   3 ^/(.*)$                                        /drupal5/index.php?q=$1        
Mon Feb 26 16:59:39 2007 - ParseRuleModifierFlags: '[L]'
Mon Feb 26 16:59:39 2007 - Done reading .ini file: Found 3 rules (0 failed) on 34 lines
Mon Feb 26 16:59:39 2007 - Ionic URL Rewriting ISAPI Filter v1.2.11b
Mon Feb 26 16:59:39 2007 - Initialize,  main threadId= 2064
Mon Feb 26 16:59:39 2007 - File watcher thread created.

My IsapiRewrite4.ini file:
# Drupal Clean URLs
# -----------------
# These rules assume E:\drupal5 is a virtual dir in the doc root.
# Additionally, /drupal5 is automagically prepended as needed
# to coexist with other files for graceful migration.
# Note that this WILL fail if a Drupal path already exists as
# in the root file system.
 
RewriteLog       E:\Ionic_Rewrite\Logs\Project\iirf
RewriteLogLevel  3
 
RewriteFilterPriority HIGH
 
# Skip existing files/dirs with dummy replace (any NOOP available?)
# (e.g. /index.htm)
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^(.*)$ $1 [L]
 
# Existing Drupal file/directories
# (e.g. /drupal5/index.php)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond E:\drupal5\%{URL} -f [OR]
RewriteCond E:\drupal5\%{URL} -d [OR]
RewriteRule ^/(.*)$ /drupal5/$1 [L] 
 
# Rewrite as a Drupal query
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond E:\drupal5\%{URL} !-f
RewriteCond E:\drupal5\%{URL} !-d
RewriteRule ^/(.*)$ /drupal5/index.php?q=$1 [L] 
 

Hope this helps you isolate the problem.

Marco
Feb 26, 2007 at 10:15 PM
What prompted you to make a licensing change? Besides the patent issue, how does this differ from the bsd license?

Marco
Coordinator
Feb 27, 2007 at 1:10 AM
Marco, thanks for the feedback.

The logging suggestion is a good one. I will do that.

As for the other problem, that will take me a while to examine.

Finally, for the license - I work for Microsoft and this license is strongly suggested by the company, if I want to have the ability to work on this project using company equipment, and on compnay time. That is not to say IIRF is my full-time job. It is not. But if I work on it at all, then this license should protect everyone much better. So they tell me.
Coordinator
Feb 27, 2007 at 2:32 AM
Marco,
about your "non-responsive IIRF" probblem, can you tell me what you mean by non-responsive. If you change the IIRF ini file once, and you get the messages like so:
Mon Feb 26 16:05:52 2007 - Done reading .ini file: Found 0 rules (0 failed) on 1 lines
Mon Feb 26 16:05:52 2007 - INFO: Re-using previous logfile because the ini file is suspisciously short.

is it the case that subsequent changes to the ini file are not recognized or detected?

ps: maybe a new thread is better? if you create it I will follow you.