Forum Discussion
Brian_107072
Jan 24, 2011Nimbostratus
HTTP::respond 408 content not working for Firefox
Greetings fellow iRule coders,
We want our BigIP to display status pages, either intercept status codes form servers or serve status pages for specific requests.
We have it all working except for the 408 status code. When we serve a 408 status code Firefox displays "The connection was reset" while IE displays the 408 status page. Any idea why this happens with firefox and how to work around it?
We are on BigIP 9.4.8
Example of the iRule:
switch -glob $respStatus {
400 -
401 -
403 -
404 -
408 -
500 -
503 { HTTP::respond $respStatus content $err($respStatus) }
}
The variable "$err($respStatus)" contains the html to be displayed as the status page.
I have tried duplicating the 408 html with the 404 and that made no difference. So I have ruled out the actual html as the culprit. I assume it has something to do with how the browser handles a 408 status code.
Debugging shows that firefox seems to go into a loop requesting the same page 10 times then it displays the error page. IE requests the page once and acts as expected.
Any assistance would be appreciated.
- Chris_MillerAltostratusGoogling "firefox http 408" shows someone else as having the exact same problem (via experts-exchange) where firefox displays a connection reset. I suppose you could rewrite the 408 as a different response code and see whether that helps?
- Colin_Walker_12Historic F5 AccountIt indeed sounds like a bug or questionable behavior in FireFox that is preventing you from displaying the desired status code (408: Request timed out) page. If you want to go the rewrite route it shouldn't be terribly hard, you'd just have to change the switch a little bit:
switch -glob $respStatus { 400 - 401 - 403 - 404 - 500 - 503 { HTTP::respond $respStatus content $err($respStatus) } 408 { HTTP::respond 400 content $err($respStatus)} }
- Colin_Walker_12Historic F5 AccountIt indeed sounds like a bug or questionable behavior in FireFox that is preventing you from displaying the desired status code (408: Request timed out) page. If you want to go the rewrite route it shouldn't be terribly hard, you'd just have to change the switch a little bit:
switch -glob $respStatus { 400 - 401 - 403 - 404 - 500 - 503 { HTTP::respond $respStatus content $err($respStatus) } 408 { HTTP::respond 400 content $err($respStatus)} }
- Brian_107072NimbostratusChris & Colin,
- Colin_Walker_12Historic F5 AccountSure thing, let us know how it goes.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects