Forum Discussion
hoolio
Cirrostratus
Sep 21, 2009Effect of 'drop/discard' in HTTP_RESPONSE event?
Hi,
I'm wondering what drop/discard actually do when called from HTTP_RESPONSE. I don't have an easy way to test the customer's exact scenario, so I'm hoping someone here can tell me what it *should* do.
Ideally, I'd like to just not send that specific HTTP response back to the client, but leave the server side TCP connection available for further OneConnect use.
If I check a status code in HTTP_RESPONSE, see it's one I don't like, and call 'drop' or 'discard', does it just prevent the current payload from being sent to the client?
Does it affect any further data that the server might send for that response or in subsequent responses to other HTTP requests?
Does it trigger a FIN or RST being sent on the serverside connection? Does this behavior change if OneConnect is enabled on the VIP?
As long as I'm asking about 'drop/discard', would 'reject' behave differently in terms of the serverside TCP connection being left open?
Thanks,
Aaron
- hoolio
Cirrostratus
Hi Colin, - Yepher_100160
Nimbostratus
When you use "drop" in "when HTTP_RESPONSE" the HTTP source clients connection is reset. - Yepher_100160
Nimbostratus
- Colin_Walker_12Historic F5 AccountThis sounds like exactly what OneConnect is for. Why do you think it won't be helpful?
- Yepher_100160
Nimbostratus
Collin, - spark_86682Historic F5 AccountIn the HTTP_RESPONSE I want to close the connection to the server but leave the F5->Client socket/HTTP alone as if "HTTP_RESPONSE" event was never fired. I want to do this based on some header value from the server. It appears that drop and discard does not solve the problem. Both of these commands close the clients socket immediately. Here is an example use case: http://yepher.com/sequencePNG.jsp?data=[settings]%0AshowRungNumber%3Dyes%0A%0A[title]%0ALeave%20Open%20Use%20Case%0A%0A[actors]%0AClientA%0A|%0AF5%0AWebServer%0A%0A[sequences]%0AHTTP%20Request%2C%20ClientA%2C%20F5%0AHTTP%20Request%2C%20F5%2C%20WebServer%0AHTTP%20Response%20%28x-leave-open%3A%20true%29%2C%20WebServer%2C%20F5%0ATCP%20Close%20Connection%2C%20F5%2C%20WebServer%0ANo%20HTTP%20Response%20Back%20to%20ClientA%2C%20F5%2C%20F5%0A%0A%0A&name=image.png Once I figure out how to do this I wan to be able to push data over the F5-Client TCP connection from another server at some point in the future. This isn't going to be a trivial iRule. I don't know exactly what it will look like, but HTTP::retry is likely to be your best path to success here. You can certainly suppress the initial server response to the client while collecting it in a variable, and then call HTTP::retry and prepend the original server's response to the second server's response (rinse and repeat as necessary). I'd start there. Good luck!
- Yepher_100160
Nimbostratus
Spark, - Yepher_100160
Nimbostratus
Spark, - spark_86682Historic F5 AccountBy default, HTTP::retry may just resend the original request, but you can supply a different one for it to send instead. However, if you cannot send any HTTP request at all to your second server (meaning, the server that is going to supply the response which causes a response to be sent to the client), then I don't see any way for you to accomplish this. In such a case, what are you sending to that server? I mean, you're not expecting that server to initiate the TCP connection, right?
- Yepher_100160
Nimbostratus
Actually yes, I would like the second server to initiate the TCP connection (or better yet an HTTP Post) back to the F5 and the data it sends is the data to be relayed back to the client.
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