Forum Discussion
Robert_47833
Altostratus
May 12, 2013stream necessay?
I want to use STREAM::expression to replace data in HTTP request
is STREAM profile needed applied in virtual server?
is stream:enable needed to set following stream::expression?
13 Replies
- What_Lies_Bene1
Cirrostratus
Yes you'll need a 'blank' (with no source or target strings specified) Stream profile assigned to the VS. Stream::enable is needed after the stream::expression command. Don't forget to use stream::disable with the HTTP_RESPONSE event to prevent responses being rewritten. - Robert_47833
Altostratus
Hi,Steve
my ltm is v10, I found if content length doesn't match payload length after replacement,it will cause issue in request ,is it?
and only v11 support this dismatch in request. - What_Lies_Bene1
Cirrostratus
Not a problem: HTTP Content-Length is automatically updated from v9.4.0. - Robert_47833
Altostratus
Requests
In BIG-IP 9.x - 10.x, you cannot chunk the request and the system does not alter the Content-Length header value of HTTP requests. Without the use of the chunking feature, if the size of the content is modified by the replacement action of the Stream profile, the Content-Length header contains the wrong value. Since the Content-Length header is proxied to the server before the Stream replacements are performed, there is no way to adjust the reported content length or chunk lengths. Applications are likely to fail if the length of the HTTP payload does not match the value reported by the Content-Length HTTP header (for example, if the server receives more POST data than what is reported by the header).
[16:21:24] Robert Cao: https://support.f5.com/kb/en-us/solutions/public/8000/100/sol8115.html
so this is misleading statment
by the way:we need to add a new http_response event and stream::disable to disable the feature of stream profile,right?if,yes,why?
if I don't specify http_response event,is it fine? - What_Lies_Bene1
Cirrostratus
Apologies, things obviously work differently for requests.
If you don't specify the response event and use stream::disable then it's possible response data will be rewritten which I assume is not desired. - Robert_47833
Altostratus
1:ok,so content-length is not a issue since LTM can update it automatically.
2:for http response,hmmm,odd
I only use stream::expression in http_request,why it can replace patterns in http response?
ha,if so,I will consider it as a LTM behavior. - What_Lies_Bene1
Cirrostratus
1) No, you were right, it is an issue if you are rewriting requests
2) A Stream profiles works on requests and responses so you need to disable for one or the other depending on your needs. Yes standard LTM behaviour.
What data are you looking to replace? Is it actually body data or something in the headers? Surely it would be better to fix the app (as that's normally the reason for this)? - Robert_47833
Altostratus
2)I wanna replace pattern in http body,
by the way,I use irule to replace pattern,and use default stream profile
I didn't see any replacement in default stream profile. - Robert_47833
Altostratus
2)I wanna replace pattern in http body,
by the way,I use irule to replace pattern,and use default stream profile
I didn't see any replacement in default stream profile. - Robert_47833
Altostratus
in http request body,the app can't fix this,because I want to change something in request to fool the app,ha
it seems the only option for me is to keep the same length even I replace the old pattern in http request body
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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