Bug (IonicIsapiRewriter-1.2.14)?

Topics: Developer Forum, Project Management Forum, User Forum
Jul 8, 2008 at 6:39 AM
Edited Jul 8, 2008 at 6:58 AM
RewriteRule ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$ /test.aspx?cid=$1&sort=$3&page=$5  [U,I,L]

/17_S3_P3.html (Match Success)
/17_P3.html (Match Success)
/17_S1.html (No match And IIS Crashes Throw Exception: IIS Worker Process Stop)
Log: Rewrite Url to: '/test.aspx?cid=17&sort=1&page=$5'
Coordinator
Jul 8, 2008 at 7:04 AM
Edited Jul 8, 2008 at 7:12 AM
let me look into this...

Update:  Can you run the testdriver.exe and tell me what you see? 
I just ran it and did not see the problem you are reporting.

IsapiRewrite4.ini:
RewriteLogLevel 5
RewriteRule  ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$ /test.aspx?cid=$1&sort=$3&page=$5  [U,I,L]

SampleUrls.txt:
/17_S3_P3.html 
/17_P3.html 
/17_S1.html 


output:
c:\Desktop\IIRF\IonicIsapiRewriter-1.2.14>bin\TestDriver.exe  -d tests\penghao

--------------------------------------------
Mon Jul 07 23:09:13 2008 - ReadConfig: setting LogLevel to 5
Mon Jul 07 23:09:13 2008 - ReadConfig: line  10: RewriteRule   1 ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$             /test.aspx?cid=$1&sort=$3&page=$5           [U,I
,L]
Mon Jul 07 23:09:13 2008 - ReadConfig: not a duplicate rule...
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: '[U,I,L]'
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'U'
Mon Jul 07 23:09:13 2008 - rule: Unmangle URLs
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'I'
Mon Jul 07 23:09:13 2008 - rule: Case Insensitive match
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'L'
Mon Jul 07 23:09:13 2008 - rule: Last
Mon Jul 07 23:09:13 2008 - ReadConfig: Done reading, found 1 rules (0 failed) on 13 lines
done reading new config
Mon Jul 07 23:09:13 2008 - LogFile re-opened.
Mon Jul 07 23:09:13 2008 - ReadConfig
Mon Jul 07 23:09:13 2008 - ReadConfig: setting LogLevel to 5
Mon Jul 07 23:09:13 2008 - ReadConfig: line  10: RewriteRule   1 ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$             /test.aspx?cid=$1&sort=$3&page=$5           [U,I
,L]
Mon Jul 07 23:09:13 2008 - ReadConfig: not a duplicate rule...
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: '[U,I,L]'
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'U'
Mon Jul 07 23:09:13 2008 - rule: Unmangle URLs
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'I'
Mon Jul 07 23:09:13 2008 - rule: Case Insensitive match
Mon Jul 07 23:09:13 2008 - ParseRuleModifierFlags: token 'L'
Mon Jul 07 23:09:13 2008 - rule: Last
Mon Jul 07 23:09:13 2008 - ReadConfig: Done reading, found 1 rules (0 failed) on 13 lines

--------------------------------------------
Mon Jul 07 23:09:13 2008 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.14 final R2
Mon Jul 07 23:09:13 2008 - Initialize: config file 'tests\penghao\IsapiRewrite4.ini'
Mon Jul 07 23:09:13 2008 - Initialize: main threadId= 8092
Processing URLs...(tests\penghao\SampleUrls.txt)

Mon Jul 07 23:09:13 2008 - ApplyRules: depth=0
Mon Jul 07 23:09:13 2008 - ApplyRules: Rule 1 : 6 matches
Mon Jul 07 23:09:13 2008 - ReplaceServerVariables: InputString='/test.aspx?cid=$1&sort=$3&page=$5' out='/test.aspx?cid=$1&sort=$3&page=$5'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: src='/17_S3_P3.html' originalAttribute="src" originalPath="/17_S3_P3.html",'(null)' ReplacePattern='/test.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 14, 1, 3, 3
, 6, 5, 6, 6, 9, 8, 9] [] ] counts=6,0
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($1) with '17'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($3) with '3'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($5) with '3'
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: before '/test.aspx?cid=17&sort=3&page=3'
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: after  '/test.aspx?cid=17&sort=3&page=3'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: result '/test.aspx?cid=17&sort=3&page=3'
Mon Jul 07 23:09:13 2008 - ApplyRules: Result (length 31): /test.aspx?cid=17&sort=3&page=3
Mon Jul 07 23:09:13 2008 - ApplyRules: Last if Match
Mon Jul 07 23:09:13 2008 - ApplyRules: returning 1

REWRITE '/17_S3_P3.html' ==> '/test.aspx?cid=17&sort=3&page=3'

Mon Jul 07 23:09:13 2008 - ApplyRules: depth=0
Mon Jul 07 23:09:13 2008 - ApplyRules: Rule 1 : 6 matches
Mon Jul 07 23:09:13 2008 - ReplaceServerVariables: InputString='/test.aspx?cid=$1&sort=$3&page=$5' out='/test.aspx?cid=$1&sort=$3&page=$5'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: src='/17_P3.html' originalAttribute="src" originalPath="/17_P3.html",'(null)' ReplacePattern='/test.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 11, 1, 3, -1,
-1, -1, -1, 3, 6, 5, 6] [] ] counts=6,0
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($1) with '17'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($3) with ''
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($5) with '3'
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: before '/test.aspx?cid=17&sort=&page=3'
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: after  '/test.aspx?cid=17&sort=&page=3'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: result '/test.aspx?cid=17&sort=&page=3'
Mon Jul 07 23:09:13 2008 - ApplyRules: Result (length 30): /test.aspx?cid=17&sort=&page=3
Mon Jul 07 23:09:13 2008 - ApplyRules: Last if Match
Mon Jul 07 23:09:13 2008 - ApplyRules: returning 1

REWRITE '/17_P3.html' ==> '/test.aspx?cid=17&sort=&page=3'

Mon Jul 07 23:09:13 2008 - ApplyRules: depth=0
Mon Jul 07 23:09:13 2008 - ApplyRules: Rule 1 : 4 matches
Mon Jul 07 23:09:13 2008 - ReplaceServerVariables: InputString='/test.aspx?cid=$1&sort=$3&page=$5' out='/test.aspx?cid=$1&sort=$3&page=$5'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: src='/17_S1.html' originalAttribute="src" originalPath="/17_S1.html",'(null)' ReplacePattern='/test.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 11, 1, 3, 3, 6
, 5, 6] [] ] counts=4,0
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($1) with '17'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: replacing ($3) with '1'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: Attention: Either we have a Substring index out of range, or the URL is using escaped chars ($5)
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: before '/test.aspx?cid=17&sort=1&page=$5'
Mon Jul 07 23:09:13 2008 - ApplyCaseConversion: after  '/test.aspx?cid=17&sort=1&page=$5'
Mon Jul 07 23:09:13 2008 - GenerateReplacementString: result '/test.aspx?cid=17&sort=1&page=$5'
Mon Jul 07 23:09:13 2008 - ApplyRules: Result (length 32): /test.aspx?cid=17&sort=1&page=$5
Mon Jul 07 23:09:13 2008 - ApplyRules: Last if Match
Mon Jul 07 23:09:13 2008 - ApplyRules: returning 1

REWRITE '/17_S1.html' ==> '/test.aspx?cid=17&sort=1&page=$5'

Mon Jul 07 23:09:13 2008 - DllMain PROCESS_DETACH
Coordinator
Jul 8, 2008 at 7:25 AM

you can see the warning in my log file that reads:

"Attention: Either we have a Substring index out of range, or the URL is using escaped chars ($5)"

 There was a bug in the initial release of 1.2.14 where there was a problem with replacement strings,  you can read about one symptom of the problem here: 
http://www.codeplex.com/IIRF/Thread/View.aspx?ThreadId=28643

I patched the 1.2.14 release to correct this problem . The patched release is called "v1.2.14 final R2". 
If you have the R2 release, I believe you should have the fix and NOT see the problem you are reporting.
If you do not have the R2 release, can you please download it and test it?  

http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13940

Jul 8, 2008 at 7:41 AM
TestDriver.exe test is pass but  
test /17_S1.html  (IIS Crashes Throw Exception: IIS Worker Process Stop)


my test:
IsapiRewrite4 download from http://www.codeplex.com/IIRF/Release/ProjectReleases.aspx?ReleaseId=13940 IonicIsapiRewriter-1.2.14-bin.zip
IsapiRewrite4.ini
RewriteLog  D:\Bin\IsapiRewrite\iirfLog.out
RewriteLogLevel 5
RewriteRule  ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$ /product.aspx?cid=$1&sort=$3&page=$5  [U,I,L]

testurls:
/17_S3_P3.html
/17_P3.html
/17_S1.html 

D:\Bin\IsapiRewrite\iirfLog.out.2044.log
--------------------------------------------
Tue Jul 08 14:29:33 2008 - ReadConfig: setting LogLevel to 5
Tue Jul 08 14:29:34 2008 - ReadConfig: line  18: RewriteRule   1 ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$             /product.aspx?cid=$1&sort=$3&page=$5        [U,I,L]
Tue Jul 08 14:29:34 2008 - ReadConfig: not a duplicate rule...
Tue Jul 08 14:29:34 2008 - ParseRuleModifierFlags: '[U,I,L]'
Tue Jul 08 14:29:34 2008 - ParseRuleModifierFlags: token 'U'
Tue Jul 08 14:29:34 2008 - rule: Unmangle URLs
Tue Jul 08 14:29:34 2008 - ParseRuleModifierFlags: token 'I'
Tue Jul 08 14:29:34 2008 - rule: Case Insensitive match
Tue Jul 08 14:29:34 2008 - ParseRuleModifierFlags: token 'L'
Tue Jul 08 14:29:34 2008 - rule: Last
Tue Jul 08 14:29:34 2008 - ReadConfig: Done reading, found 1 rules (0 failed) on 39 lines
Tue Jul 08 14:29:34 2008 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.14 final R2
Tue Jul 08 14:29:34 2008 - Initialize: config file 'D:\Bin\IsapiRewrite\IsapiRewrite4.ini'
Tue Jul 08 14:29:34 2008 - Initialize: main threadId= 5928
Tue Jul 08 14:29:34 2008 - Initialize: File watcher thread created.
Tue Jul 08 14:29:34 2008 - GetFilterVersion
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:29:34 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\17_S3_P3.html), in ptr (0x017ad4f0)
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:29:34 2008 - DoRewrites
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: 15 bytes
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: result '/17_S3_P3.html'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:29:34 2008 - DoRewrites: New Url: '/17_S3_P3.html'
Tue Jul 08 14:29:34 2008 - ApplyRules: depth=0
Tue Jul 08 14:29:34 2008 - ApplyRules: Rule 1 : 6 matches
Tue Jul 08 14:29:34 2008 - ReplaceServerVariables: InputString='/product.aspx?cid=$1&sort=$3&page=$5' out='/product.aspx?cid=$1&sort=$3&page=$5'
Tue Jul 08 14:29:34 2008 - GenerateReplacementString: src='/17_S3_P3.html','(null)' ReplacePattern='/product.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 14, 1, 3, 3, 6, 5, 6, 6, 9, 8, 9] [] ] counts=6,0
Tue Jul 08 14:29:34 2008 - GenerateReplacementString: replacing ($1) with '17'
Tue Jul 08 14:29:34 2008 - GenerateReplacementString: replacing ($3) with '3'
Tue Jul 08 14:29:34 2008 - GenerateReplacementString: replacing ($5) with '3'
Tue Jul 08 14:29:34 2008 - ApplyCaseConversion: before '/product.aspx?cid=17&sort=3&page=3'
Tue Jul 08 14:29:34 2008 - ApplyCaseConversion: after  '/product.aspx?cid=17&sort=3&page=3'
Tue Jul 08 14:29:34 2008 - GenerateReplacementString: result '/product.aspx?cid=17&sort=3&page=3'
Tue Jul 08 14:29:34 2008 - ApplyRules: Result (length 34): /product.aspx?cid=17&sort=3&page=3
Tue Jul 08 14:29:34 2008 - ApplyRules: Last if Match
Tue Jul 08 14:29:34 2008 - ApplyRules: returning 1
Tue Jul 08 14:29:34 2008 - DoRewrites: Rewrite Url to: '/product.aspx?cid=17&sort=3&page=3'
Tue Jul 08 14:29:34 2008 - FileChangeWatcher(): Enter, threadId=408...
Tue Jul 08 14:29:34 2008 - FileChangeWatcher: Await()...
Tue Jul 08 14:29:34 2008 - AwaitIniChangeAndReinit()...
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:29:34 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\product.aspx), in ptr (0x017ad4f0)
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:29:34 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\favicon.ico), in ptr (0x0e5743f8)
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:29:34 2008 - DoRewrites
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: 13 bytes
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: result '/favicon.ico'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:29:34 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:29:34 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:29:34 2008 - DoRewrites: New Url: '/favicon.ico'
Tue Jul 08 14:29:34 2008 - ApplyRules: depth=0
Tue Jul 08 14:29:34 2008 - ApplyRules: Rule 1 : -1 (No match)
Tue Jul 08 14:29:34 2008 - ApplyRules: returning 0
Tue Jul 08 14:29:34 2008 - DoRewrites: No Rewrite
Tue Jul 08 14:29:34 2008 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jul 08 14:29:45 2008 - DllMain THREAD_DETACH, threadId= 2716
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:00 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\17_P3.html), in ptr (0x017ad4f0)
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:30:00 2008 - DoRewrites
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: 12 bytes
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: result '/17_P3.html'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:30:00 2008 - DoRewrites: New Url: '/17_P3.html'
Tue Jul 08 14:30:00 2008 - ApplyRules: depth=0
Tue Jul 08 14:30:00 2008 - ApplyRules: Rule 1 : 6 matches
Tue Jul 08 14:30:00 2008 - ReplaceServerVariables: InputString='/product.aspx?cid=$1&sort=$3&page=$5' out='/product.aspx?cid=$1&sort=$3&page=$5'
Tue Jul 08 14:30:00 2008 - GenerateReplacementString: src='/17_P3.html','(null)' ReplacePattern='/product.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 11, 1, 3, -1, -1, -1, -1, 3, 6, 5, 6] [] ] counts=6,0
Tue Jul 08 14:30:00 2008 - GenerateReplacementString: replacing ($1) with '17'
Tue Jul 08 14:30:00 2008 - GenerateReplacementString: replacing ($3) with ''
Tue Jul 08 14:30:00 2008 - GenerateReplacementString: replacing ($5) with '3'
Tue Jul 08 14:30:00 2008 - ApplyCaseConversion: before '/product.aspx?cid=17&sort=&page=3'
Tue Jul 08 14:30:00 2008 - ApplyCaseConversion: after  '/product.aspx?cid=17&sort=&page=3'
Tue Jul 08 14:30:00 2008 - GenerateReplacementString: result '/product.aspx?cid=17&sort=&page=3'
Tue Jul 08 14:30:00 2008 - ApplyRules: Result (length 33): /product.aspx?cid=17&sort=&page=3
Tue Jul 08 14:30:00 2008 - ApplyRules: Last if Match
Tue Jul 08 14:30:00 2008 - ApplyRules: returning 1
Tue Jul 08 14:30:00 2008 - DoRewrites: Rewrite Url to: '/product.aspx?cid=17&sort=&page=3'
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:00 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\product.aspx), in ptr (0x0e574468)
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:00 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\favicon.ico), in ptr (0x0e5744d8)
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:30:00 2008 - DoRewrites
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: 13 bytes
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: result '/favicon.ico'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:30:00 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:30:00 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:30:00 2008 - DoRewrites: New Url: '/favicon.ico'
Tue Jul 08 14:30:00 2008 - ApplyRules: depth=0
Tue Jul 08 14:30:00 2008 - ApplyRules: Rule 1 : -1 (No match)
Tue Jul 08 14:30:00 2008 - ApplyRules: returning 0
Tue Jul 08 14:30:00 2008 - DoRewrites: No Rewrite
Tue Jul 08 14:30:00 2008 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jul 08 14:30:18 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:18 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\17_S1.html), in ptr (0x0e574468)
Tue Jul 08 14:30:18 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:30:18 2008 - DoRewrites
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: 12 bytes
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: result '/17_S1.html'
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:30:18 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:30:18 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:30:18 2008 - DoRewrites: New Url: '/17_S1.html'
Tue Jul 08 14:30:18 2008 - ApplyRules: depth=0
Tue Jul 08 14:30:18 2008 - ApplyRules: Rule 1 : 4 matches
Tue Jul 08 14:30:18 2008 - ReplaceServerVariables: InputString='/product.aspx?cid=$1&sort=$3&page=$5' out='/product.aspx?cid=$1&sort=$3&page=$5'
Tue Jul 08 14:30:18 2008 - GenerateReplacementString: src='/17_S1.html','(null)' ReplacePattern='/product.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 11, 1, 3, 3, 6, 5, 6] [] ] counts=4,0
Tue Jul 08 14:30:18 2008 - GenerateReplacementString: replacing ($1) with '17'
Tue Jul 08 14:30:18 2008 - GenerateReplacementString: replacing ($3) with '1'
Tue Jul 08 14:30:18 2008 - GenerateReplacementString: Attention: Either we have a Substring index out of range, or the URL is using escaped chars ($5)
Tue Jul 08 14:30:18 2008 - ApplyCaseConversion: before '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:18 2008 - ApplyCaseConversion: after  '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:18 2008 - GenerateReplacementString: result '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:18 2008 - ApplyRules: Result (length 35): /product.aspx?cid=17&sort=1&page=$5
Tue Jul 08 14:30:18 2008 - ApplyRules: Last if Match
Tue Jul 08 14:30:18 2008 - ApplyRules: returning 1
Tue Jul 08 14:30:18 2008 - DoRewrites: Rewrite Url to: '/product.aspx?cid=17&sort=1&page=$5'


D:\Bin\IsapiRewrite\iirfLog.out.4136.log
--------------------------------------------
Tue Jul 08 14:30:29 2008 - ReadConfig: setting LogLevel to 5
Tue Jul 08 14:30:29 2008 - ReadConfig: line  18: RewriteRule   1 ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$             /product.aspx?cid=$1&sort=$3&page=$5        [U,I,L]
Tue Jul 08 14:30:29 2008 - ReadConfig: not a duplicate rule...
Tue Jul 08 14:30:29 2008 - ParseRuleModifierFlags: '[U,I,L]'
Tue Jul 08 14:30:29 2008 - ParseRuleModifierFlags: token 'U'
Tue Jul 08 14:30:29 2008 - rule: Unmangle URLs
Tue Jul 08 14:30:29 2008 - ParseRuleModifierFlags: token 'I'
Tue Jul 08 14:30:29 2008 - rule: Case Insensitive match
Tue Jul 08 14:30:29 2008 - ParseRuleModifierFlags: token 'L'
Tue Jul 08 14:30:29 2008 - rule: Last
Tue Jul 08 14:30:29 2008 - ReadConfig: Done reading, found 1 rules (0 failed) on 39 lines
Tue Jul 08 14:30:29 2008 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.14 final R2
Tue Jul 08 14:30:29 2008 - Initialize: config file 'D:\Bin\IsapiRewrite\IsapiRewrite4.ini'
Tue Jul 08 14:30:29 2008 - Initialize: main threadId= 4288
Tue Jul 08 14:30:29 2008 - Initialize: File watcher thread created.
Tue Jul 08 14:30:29 2008 - GetFilterVersion
Tue Jul 08 14:30:29 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:29 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\favicon.ico), in ptr (0x01818700)
Tue Jul 08 14:30:29 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:30:29 2008 - DoRewrites
Tue Jul 08 14:30:29 2008 - FileChangeWatcher(): Enter, threadId=4776...
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:30:29 2008 - FileChangeWatcher: Await()...
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: 13 bytes
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: result '/favicon.ico'
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:30:29 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:30:29 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:30:29 2008 - DoRewrites: New Url: '/favicon.ico'
Tue Jul 08 14:30:29 2008 - ApplyRules: depth=0
Tue Jul 08 14:30:29 2008 - ApplyRules: Rule 1 : -1 (No match)
Tue Jul 08 14:30:29 2008 - ApplyRules: returning 0
Tue Jul 08 14:30:29 2008 - DoRewrites: No Rewrite
Tue Jul 08 14:30:29 2008 - HttpFilterProc: SF_NOTIFY_LOG
Tue Jul 08 14:30:29 2008 - AwaitIniChangeAndReinit()...
Tue Jul 08 14:31:38 2008 - DllMain THREAD_DETACH, threadId= 520
Tue Jul 08 14:33:08 2008 - DllMain THREAD_DETACH, threadId= 5852
Tue Jul 08 14:33:38 2008 - DllMain THREAD_DETACH, threadId= 5256
Tue Jul 08 14:34:38 2008 - DllMain THREAD_DETACH, threadId= 2220
Tue Jul 08 14:35:08 2008 - DllMain THREAD_DETACH, threadId= 5196
Tue Jul 08 14:36:07 2008 - DllMain THREAD_DETACH, threadId= 5212
Tue Jul 08 14:36:44 2008 - AwaitIniChangeAndReinit: watcher got something...
Tue Jul 08 14:36:44 2008 - AwaitIniChangeAndReinit: Detected change in file 'iirfLog.out.4136.log'
Tue Jul 08 14:36:44 2008 - AwaitIniChangeAndReinit:  TerminateWatch = FALSE
Tue Jul 08 14:36:44 2008 - FileChangeWatcher(): Await returns (TerminateWatch= FALSE)
Tue Jul 08 14:36:44 2008 - FileChangeWatcher: Await()...
Tue Jul 08 14:36:44 2008 - AwaitIniChangeAndReinit()...
Tue Jul 08 14:37:07 2008 - DllMain THREAD_DETACH, threadId= 4876
Tue Jul 08 14:38:07 2008 - DllMain THREAD_DETACH, threadId= 6056


D:\Bin\IsapiRewrite\iirfLog.out.5500.log
--------------------------------------------
Tue Jul 08 14:30:25 2008 - ReadConfig: setting LogLevel to 5
Tue Jul 08 14:30:25 2008 - ReadConfig: line  18: RewriteRule   1 ^/(\d+)(_S(\d+))?(_P(\d+))?\.html$             /product.aspx?cid=$1&sort=$3&page=$5        [U,I,L]
Tue Jul 08 14:30:25 2008 - ReadConfig: not a duplicate rule...
Tue Jul 08 14:30:25 2008 - ParseRuleModifierFlags: '[U,I,L]'
Tue Jul 08 14:30:25 2008 - ParseRuleModifierFlags: token 'U'
Tue Jul 08 14:30:25 2008 - rule: Unmangle URLs
Tue Jul 08 14:30:25 2008 - ParseRuleModifierFlags: token 'I'
Tue Jul 08 14:30:25 2008 - rule: Case Insensitive match
Tue Jul 08 14:30:25 2008 - ParseRuleModifierFlags: token 'L'
Tue Jul 08 14:30:25 2008 - rule: Last
Tue Jul 08 14:30:25 2008 - ReadConfig: Done reading, found 1 rules (0 failed) on 39 lines
Tue Jul 08 14:30:25 2008 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.14 final R2
Tue Jul 08 14:30:25 2008 - Initialize: config file 'D:\Bin\IsapiRewrite\IsapiRewrite4.ini'
Tue Jul 08 14:30:25 2008 - Initialize: main threadId= 6016
Tue Jul 08 14:30:25 2008 - Initialize: File watcher thread created.
Tue Jul 08 14:30:25 2008 - GetFilterVersion
Tue Jul 08 14:30:25 2008 - FileChangeWatcher(): Enter, threadId=4148...
Tue Jul 08 14:30:25 2008 - FileChangeWatcher: Await()...
Tue Jul 08 14:30:25 2008 - AwaitIniChangeAndReinit()...
Tue Jul 08 14:30:25 2008 - HttpFilterProc: SF_NOTIFY_URL_MAP
Tue Jul 08 14:30:25 2008 - OnUrlMap: storing physical path (E:\PROJECT\TPSystem\TPSystem.Shop\17_S1.html), in ptr (0x01884390)
Tue Jul 08 14:30:25 2008 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Tue Jul 08 14:30:25 2008 - DoRewrites
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: getting 'url'
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: 128 bytes
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: getting 'url'
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: 12 bytes
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: result '/17_S1.html'
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: 1 bytes
Tue Jul 08 14:30:25 2008 - GetServerVariable_AutoFree: result ''
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: getting 'method'
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: 4 bytes
Tue Jul 08 14:30:25 2008 - GetHeader_AutoFree: result 'GET'
Tue Jul 08 14:30:25 2008 - DoRewrites: New Url: '/17_S1.html'
Tue Jul 08 14:30:25 2008 - ApplyRules: depth=0
Tue Jul 08 14:30:25 2008 - ApplyRules: Rule 1 : 4 matches
Tue Jul 08 14:30:25 2008 - ReplaceServerVariables: InputString='/product.aspx?cid=$1&sort=$3&page=$5' out='/product.aspx?cid=$1&sort=$3&page=$5'
Tue Jul 08 14:30:25 2008 - GenerateReplacementString: src='/17_S1.html','(null)' ReplacePattern='/product.aspx?cid=$1&sort=$3&page=$5' vec=[[  [  0, 11, 1, 3, 3, 6, 5, 6] [] ] counts=4,0
Tue Jul 08 14:30:25 2008 - GenerateReplacementString: replacing ($1) with '17'
Tue Jul 08 14:30:25 2008 - GenerateReplacementString: replacing ($3) with '1'
Tue Jul 08 14:30:25 2008 - GenerateReplacementString: Attention: Either we have a Substring index out of range, or the URL is using escaped chars ($5)
Tue Jul 08 14:30:25 2008 - ApplyCaseConversion: before '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:25 2008 - ApplyCaseConversion: after  '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:25 2008 - GenerateReplacementString: result '/product.aspx?cid=17&sort=1&page=$5'
Tue Jul 08 14:30:25 2008 - ApplyRules: Result (length 35): /product.aspx?cid=17&sort=1&page=$5
Tue Jul 08 14:30:25 2008 - ApplyRules: Last if Match
Tue Jul 08 14:30:25 2008 - ApplyRules: returning 1
Tue Jul 08 14:30:25 2008 - DoRewrites: Rewrite Url to: '/product.aspx?cid=17&sort=1&page=$5'
Coordinator
Jul 8, 2008 at 3:51 PM
Ok, I've reproduced your problem here.
I'm looking into it...
Coordinator
Jul 8, 2008 at 5:03 PM
Penghao,
Thanks for reporting the problem.  I've found the source of the problem - bad pointer arithmetic in a particular case - and patched it in v1.2.14. 
Can you please download v1.2.14 again, and re-test?
Let me know.