Question regarding RewriteHeader

Feb 27, 2009 at 12:38 PM
Hi,

I've downloaded v1.2.15 in order to try RewriteHeader functionality in Ionics, but IIS keeps crashing when RewriteHeader lines are uncommented.

I am using XP with IIS 5.1.

INI FILE:
RewriteLog  c:\temp\iirfLog.out
RewriteLogLevel 5

RewriteCond %{QUERY_STRING} ^.+$
RewriteHeader Query-Is-Not-Empty: ^$ YaHuh
LOG OUTPUT
--------------------------------------------
Fri Feb 27 12:13:35 -  4452 - ReadConfig: setting LogLevel to 5
Fri Feb 27 12:13:35 -  4452 - ReadConfig: line  22: RewriteCond %{QUERY_STRING}                                ^.+$                                      
Fri Feb 27 12:13:35 -  4452 - ReadConfig: line  23: RewriteHeader (rule 1)  'Query-Is-Not-Empty:'  '^$'  'YaHuh'   (null)
Fri Feb 27 12:13:35 -  4452 - ReadConfig: not a duplicate rule...
Fri Feb 27 12:13:35 -  4452 - ReadConfig: Done reading, found 1 rules (0 errors, 0 warnings) on 24 lines

--------------------------------------------
Fri Feb 27 12:13:35 -  4452 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.15 final R3
Fri Feb 27 12:13:35 -  4452 - Initialize: config file 'C:\Development\Personal\IonicsTest\Ionics\IsapiRewrite4.ini'
Fri Feb 27 12:13:35 -  4452 - Initialize: File watcher thread created.
Fri Feb 27 12:13:35 -  4452 - GetFilterVersion
Fri Feb 27 12:13:35 -   576 - FileChangeWatcher(): Enter
Fri Feb 27 12:13:35 -   576 - FileChangeWatcher: Await()...
Fri Feb 27 12:13:35 -   576 - AwaitIniChangeAndReinit()...
Fri Feb 27 12:13:35 -  4468 - DllMain THREAD_DETACH
Fri Feb 27 12:13:35 -   988 - DllMain THREAD_DETACH
Fri Feb 27 12:13:35 -  4956 - DllMain THREAD_DETACH
Fri Feb 27 12:13:35 -  2444 - DllMain THREAD_DETACH
Fri Feb 27 12:18:04 -  2432 - DllMain THREAD_DETACH
Fri Feb 27 12:18:35 -   264 - DllMain THREAD_DETACH
Fri Feb 27 12:19:39 -  3100 - HttpFilterProc: SF_NOTIFY_URL_MAP
Fri Feb 27 12:19:39 -  3100 - OnUrlMap: storing physical path (C:\Development\Personal\IonicsTest\Default.aspx), in ptr (0x0010d6f0)
Fri Feb 27 12:19:39 -  3100 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Fri Feb 27 12:19:39 -  3100 - DoRewrites
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: getting 'url'
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree - no joy (GetLastError()=1413)
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: 128 bytes
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: result ''
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: getting 'url'
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: 25 bytes, result '/IonicsTest/Default.aspx'
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: getting 'QUERY_STRING'
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: 1 bytes
Fri Feb 27 12:19:39 -  3100 - GetServerVariable_AutoFree: result ''
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: getting 'method'
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: 4 bytes, result 'GET'
Fri Feb 27 12:19:39 -  3100 - DoRewrites: New Url: '/IonicsTest/Default.aspx'
Fri Feb 27 12:19:39 -  3100 - EvaluateRules: depth=0
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: getting 'Query-Is-Not-Empty:'
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree failed (GetLastError()=1413)
Fri Feb 27 12:19:39 -  3100 - GetHeader_AutoFree: 0 bytes, result '(null)'
Fri Feb 27 12:19:42 -  3100 - DllMain PROCESS_DETACH
Fri Feb 27 12:19:42 -  3100 - AwaitWatcherTermination: closing dir handle.
Fri Feb 27 12:19:42 -  3100 - AwaitWatcherTermination: Waiting 150 ms ...
Fri Feb 27 12:19:42 -  3100 - AwaitWatcherTermination: Waiting 150 ms ...
Fri Feb 27 12:19:42 -  3100 - AwaitWatcherTermination: Waiting 150 ms ...
Fri Feb 27 12:19:42 -  3100 - AwaitWatcherTermination: Waiting 150 ms ...
Fri Feb 27 12:19:43 -  3100 - AwaitWatcherTermination: Waiting 300 ms ...
Fri Feb 27 12:19:43 -  3100 - AwaitWatcherTermination: Waiting 300 ms ...
Fri Feb 27 12:19:43 -  3100 - AwaitWatcherTermination: Waiting 300 ms ...
Fri Feb 27 12:19:43 -  3100 - AwaitWatcherTermination: Waiting 300 ms ...
Fri Feb 27 12:19:44 -  3100 - AwaitWatcherTermination: Waiting 600 ms ...
Fri Feb 27 12:19:44 -  3100 - AwaitWatcherTermination: Waiting 600 ms ...
Fri Feb 27 12:19:45 -  3100 - AwaitWatcherTermination: Waiting 600 ms ...
Fri Feb 27 12:19:46 -  3100 - AwaitWatcherTermination: Waiting 600 ms ...
Fri Feb 27 12:19:46 -  3100 - AwaitWatcherTermination: Waiting 1200 ms ...
Fri Feb 27 12:19:47 -  3100 - AwaitWatcherTermination: Waiting 1200 ms ...
Fri Feb 27 12:19:49 -  3100 - AwaitWatcherTermination: Waiting 1200 ms ...
Fri Feb 27 12:19:50 -  3100 - AwaitWatcherTermination: Waiting 1200 ms ...
Fri Feb 27 12:19:51 -  3100 - AwaitWatcherTermination: Waiting 2400 ms ...
Fri Feb 27 12:19:53 -  3100 - AwaitWatcherTermination: Waiting 2400 ms ...
Fri Feb 27 12:19:56 -  3100 - AwaitWatcherTermination: Waiting 2400 ms ...
Fri Feb 27 12:19:58 -  3100 - AwaitWatcherTermination: Waiting 2400 ms ...
I think I am missing something stupid along the way, but I can't seem to get RewriteHeader functionality working. Any help/pointers is appreciated.

Thanks,
Mar 2, 2009 at 11:21 AM
According to my tests, we can only use headers that already exist in IIS. Is this correct? Can we define a custom header and configure Ionics to rewrite the value for that header?

Thanks,
Mar 2, 2009 at 11:21 AM
According to my tests, we can only use headers that already exist in IIS. Is this correct? Can we define a custom header and configure Ionics to rewrite the value for that header?

Thanks,