Provide feedback on the IBM HTTP Server forum on IBM developerWorks.
Domino by default "simplifies" URL paths that contained double-slashes, such as http://www.example.com/icons//spacer.jpg. While these do not affect mapping of URL paths to the filesystem, they can affect other modules that work on the URI directly, such as the WAS WebServer Plug-in.
Here is a recipe to remove one double-slash from the URL path:
RewriteEngine ON # Remove first double-slash from the path component of the URL RewriteRule ^(.*)//+(.*)$ $1/$2 [PT]
Domino unnecessarily set _BPX_USERID in a CGI's environment even though it already changed userids. Apache does not currently set this variable, but you can copy the "REMOTE_USER" variable to this variable to allow existing scripts to continue to function unchanged.
<Location /cgi-bin/test-cgi>
# Example of SAF-authenticated resource.
Authtype basic
AuthName foo
AuthBasicProvider saf
Require valid-user
SafRunAs %%CLIENT%%
# Copy REMOTE_USER to _BPX_USERID. Note that this only works when mod_rewrite
# is configured in "directory" context. You cannot put this outside of
# Location/Directory, as it will run prior to authentication.
Options +FollowSymlinks
RewriteEngine ON
RewriteCond %{REMOTE_USER} (.+)
RewriteRule .* - [E=_BPX_USERID:%1]
</Location>
These variables are not set by Apache. If you depend on them being set as a global
configuration for a CGI, set them with SetEnv
.
If the POST body is not newline-terminated, PULL PARSE won't read any data. There is no reason for a POST body to be newline terminated. DGW had a workaround to accomodate this by adding data to the users POST body. Apache doesn't modify the body in this way.
Set CharsetOptions DGWCompat
and then issue a response
header of Content-Encoding: binary
. This will be filtered out and short-circuit
translation in 8.5.5 and later.
While there is no direct equivalent, if UserID was being used to change to a different thread identity, mod_authnz_saf can do similar userid changes.