Forum Discussion
Business objects / SAP error in IE due to irule
Currently we have the following irule applied to convert HTTP to HTTPS
when HTTP_REQUEST {
HTTP::respond 301 Location https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}
SAP Support has provided the following irule to fix the problem
when HTTP_RESPONSE {
STREAM::disable
if {[HTTP::header exists "Cache-Control"]}
{
if {[HTTP::header "Cache-Control"] equals "no-cache"}
{
HTTP::header replace "Cache-Control" "max-age=0, must-revalidate"
}
}
if {[HTTP::header exists "Pragma"]}
{
HTTP::header remove "Pragma"
}
if {[HTTP::header exists "Content-Disposition"]}
{
set fn "[findstr [HTTP::header "Content-Disposition"] "filename=" 9]"
set cp "[substr [HTTP::header "Content-Disposition"] 0 ";"]"
log local0. "FILENAME OUTSIDE= $fn"
log local0. "CON-DISP TYPE= $cp"
if {not($fn equals "")}
{
if {[HTTP::header exists "Cache-Control"]}
{
HTTP::header replace "Cache-Control" "max-age=0, must-revalidate"
}
if {[HTTP::header exists "Pragma"]}
{
HTTP::header remove "Pragma"
}
log local0. "FILENAME SEEN = $fn"
if {$fn contains ".xls"}
{
HTTP::header replace "Content-Type" "application/vnd.ms-excel"
HTTP::header replace "Content-Type" "application/pdf"
}
}
if {[HTTP::header "Content-Type"] contains "text/html"}
{
STREAM::expression "@http:@https:@ @:9085@@"
STREAM::enable
}
}
}
Need Help With - When we just use the irule provided by SAP, the site coversion from HTTP to HTTPS does not happen. Need help with incorporating the irule provided by SAP to our existing irule.
Thanks in advance.
2 Replies
- George_Watkins_Historic F5 AccountMilan,
You'll need to provide the error message and any additional information you have if you want help troubleshooting your iRule. I don't have an SAP environment available for test so there's no way I can reproduce your issue.
Based on the limited information in your post, I'd guess this is what you are running into: Internet Explorer file downloads over SSL do not work with the cache control headers
My suggestion would be to create two virtual servers, one for HTTP and another for HTTPS. Assign the built-in HTTP to HTTPS redirect iRule (_sys_https_redirect) and an HTTP profile to the HTTP virtual. For the HTTPS virtual, attach an SSL profile, HTTP profile, the SAP pool, and finally the original iRule that SAP gave you.
Give that a shot and it should work without needing to change any of the code. If you're still running into issues, post some further detail here and we'll do our best to give you a hand.
-George - Milan_4483
Nimbostratus
Thanks George for looking in the issue.The error we were getting in IE8 was as follows
*******************************************************************
HTTP Status 404 - /ull
type Status report
message/ull
descriptionThe requested resource (/ull) is not available.
Apache Tomcat/5.5.20********************************************************************
The suggestions you provided seem to be working in IE8. We are doing additional testing. IE9 throws the following error
*****************************************************************
HTTP Status 400 - Invalid path /PlatformServices/content/view was requested
type Status report
messageInvalid path /PlatformServices/content/view was requested
descriptionThe request sent by the client was syntactically incorrect (Invalid path /PlatformServices/content/view was requested).
Apache Tomcat/5.5.20********************************************************************
To summarize we made the following changes
Applied HTTP to HTTPS irule to Virtual Server on port 80
Applied irule provided by SAP to Virtual Server on port 443
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
