on 11-03-2015 2:37 PM
Hello,
I have a problem with our webdispatcher (7.42 Patchlevel 224) on a SuSe Linux System. I want to use it for multiple systems by using the modification handler like in
wdisp/system_conflict_resolution = 1 is set and I defined a modification file:
icm/HTTP/mod_0 = PREFIX=/,FILE=/usr/sap/WDP/SYS/profile/modification_rule.txt
I want to modify the target sid depending on the URL. If the statement „o=SCM“ is in it, SCM should be set via SetHeader.
if %{PATH} regimatch *o=SCM*
SetHeader x-sap-webdisp-target-sid SCM [break]
When I enter this statement in modification_rule.txt the webdispatcher will not start.
FATAL: HttpModHandlerInit: Error processing rule file /usr/sap/WDP/SYS/profile/modification_rule.txt: syntax error in line 2: >if %{PATH} regimatch *o=SCM* <. See SAP note 1918448.
The syntax error seems to be related to the asteriscs (*) because a statement like
if %{PATH} regimatch o=SCM
SetHeader x-sap-webdisp-target-sid SCM [break]
works, but is the wrong regular expression and can not be used for my purposes. What ist the problem with the asteriscs? I tried it with "*o=scm*" and '*o=SCM*'. The later does not give the syntax error but again its the wrong regular expression.
Any idea is welcome...
Thx.
Best regards
Harry
Hi Chris,
thx for the hint. But I think the regular expression is correct. In principle it's like SAP proposes in the link that I mentioned. *bla* meaning "bla" somewhere in the phrase. But unfortunately it does not work this way. It's somehow like some kind of unwanted wildcard expansion of an asterisk in a shell.
c u
Harry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Harry,
Please find below, the meaning of *:
-------------------
The * (asterisk or star) matches when the preceding character occurs 0 or more times, for example, tre* will find tree (e is found 2 times) and tread (e is found 1 time) and trough (e is found 0 times).
-------------------
if you define *o=SCM*, since there is nothing in front of o=SCM, therefore, the syntax error occurs.
in this case, I think you should define modification rule file like below:
if %{PATH} regimatch .*o=SYS.*
SetHeader x-sap-webdisp-target-sid SCM [break]
if the statement o=SCM in it, then SCM will be set via SetHeader.
The . (period) means any character(s) in this position.
Best regards,
Shi Feng
Hi,
thx for your answer. .*o=SYS.* works 🙂 And a simple o=SYS without any asterisk works too as I found out.
Did the behaviour of the webdispatcher concerning the regular expressions change at some release? Because I've seen the version with simple asterisks (like *bla*) in all SAP documents that I found.
Anyway. It works. Thx again 🙂
c u
Harry
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
10 | |
9 | |
8 | |
6 | |
6 | |
6 | |
5 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.