Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology
Answers

Remove Whitespace from HTTP URI

Hello Guys.

I am having a problem, my application makes a get like:

http://x.x.x.x:8181/sendersmspost/receiver?login=sender&password=yyyy&dest=kkk&msg=teste msg

Note that there is a space between teste and msg. I would like to put a %20 between the strings once this request come into BIG-IP.

I have tried Policies but without sucess, since I can only modify this part of the URI.

Thank you!

0
Rate this Question

Answers to this Question

placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

You could use an iRule!

Something along the lines of:

set stripped [string map {" " ""} $originalString]

Which would remove all existing spaces.

or

set stripped [string map {" " "%20"} $originalString]

Which would replace existing spaces with "%20"

There is a TON of great info on iRules HERE

Hope that helps!

-Dylan

0
placeholder+image
USER ACCEPTED ANSWER & F5 ACCEPTED ANSWER

The problem of this uri is that the request will be

GET /sendersmspost/receiver?login=sender&password=yyyy&dest=kkk&msg=teste msg HTTP/1.1
Host: x.x.x.x:8181

So in this example, ltm may detect msg as version (third field of first line)

0