Forum Discussion
coreyva
Jan 31, 2012Nimbostratus
STREAM::expression regex
I'm in the process of writing an irule to correct for some bad code in one of our applications. The app in question has multiple bad links with tildes in it.
Example bad code
img src="~/0.jpg" wi...
hooleylist
Jan 31, 2012Cirrostratus
Hi coreyva,
The curly braces prevent character interpretation. Can you try this:
Replace '".*~/' with '/'
STREAM::expression {@src="~/@src="http://devcentral.f5.com/@ @src="http://devcentral.f5.com/~/@src="http://devcentral.f5.com/@ @src="http://devcentral.f5.com/.*/~/@src="http://devcentral.f5.com/@}
If that doesn't work, can you try a simple find/replace string to make sure the response is being parsed correctly (ie, it's not compressed)? If it's compressed, you should either disable compression on the servers or remove the Accept-Encoding header from the requests in the iRule.
Also, you should move STREAM::disable to HTTP_REQUEST to prevent the stream filter from being enabled on a subsequent HTTP request.
Aaron
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