Forum Discussion

rafaelbn_305907's avatar
rafaelbn_305907
Icon for Nimbostratus rankNimbostratus
Dec 06, 2018

Remove Whitespace from HTTP URI

Hello Guys.

 

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

 

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!

 

2 Replies

  • 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

     

  • 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)