Forum Discussion

Kamiza_49017's avatar
Kamiza_49017
Icon for Nimbostratus rankNimbostratus
Jun 22, 2010

V10.x LTM adding :-1 into url response

Hi All.

 

 

I wonder if you can help.

 

 

I have recently implemented a F5 LTM V10.x solution within a customer environment.

 

The F5 is return :-1 onto the end of a url for a small subset of websites for example https://test.testsite.co.uk:-1/

 

Obviously this breaks the solution.

 

 

I have tried to implement an irule using the stream command to fix this issue but it doesn't seem to work:

 

 

when HTTP_RESPONSE {

 

 

Disable the stream filter by default

 

STREAM::disable

 

 

Check if response type is text

 

if {[HTTP::header value Content-Type] contains "text"}{

 

Replace any http:// instance with https:// and port numbers

 

 

STREAM::expression {@http://test.testnet.co.uk:80@https://test.testnet.co.uk@ @https://test.testnet.co.uk:-1@https://test.testnet.co.uk@ @http://test.testnet.co.uk:443@https://test.testnet.co.uk@}

 

 

Enable the stream filter for this response only

 

STREAM::enable

 

}

 

}

 

 

When I bypass the F5 and connect the server directly to the internet via a static nat rule everything works fine. Obviously this is a tempoary work around and I would like to deploy the server behind the F5 to add resliency to the solution.

 

 

I hope you can help.

 

 

Regards

 

 

Brett

3 Replies

  • Hi Brett,

     

     

    Can you confirm that when you have LTM load balancing the application, you're seeing a :-1 inserted into the responses and this doesn't happen when accessing the web application directly?

     

     

    Is this happening in the response headers (like Location) and/or in the response payloads? If the headers, do you have rewrite redirects enabled on the VS's HTTP profile? What port are the pool members defined on?

     

     

    Thanks, Aaron
  • Also, the stream profile operates against uncompressed, unchunked response payloads. If the string you're trying to replace is in the response headers, you'd want to use HTTP::header to rewrite the header. If the string is in a compressed response payload, you'd want to either disable compression on the server, or remove the Accept-Encoding header from requests sent to the pool. For chunked responses, you can create a custom HTTP profile with response chunking set to rechunk. This is necessary for handling chunked responses as well as string replacements where the original and replacement strings are different lengths.

     

     

    Aaron
  • In regards to

     

     

    if {[HTTP::header value Content-Type] contains "text"}{

     

     

    You might change that to

     

     

    if {[HTTP::header value "Content-Type"] contains "text"}{

     

     

    and see if that helps...

     

     

    Regards

     

     

    Kevin