Forum Discussion

MAbbas's avatar
MAbbas
Icon for Cirrus rankCirrus
Jun 11, 2020

CRLF after HTTP/1.1

Hi .

I have a lagecy java app that does not include CRLF after protocol version .

How can I add it in an irule through F5

5 Replies

  • It's a post request

    POST /abcde HTTP/1.1 need a CRLF here

    Update - i can see it in binary scan that it smissing a Carrage Return  -- 

    but if I try and update HTTP::request - it gives me an error

     

     POST\x20/abcd\x20HTTP/1.0\x0a

    Thanks​

    • MAbbas's avatar
      MAbbas
      Icon for Cirrus rankCirrus

      ​i have done a find and replace in TCP -- CLIENT_DATA

      regsub -all "\n" $packetdata "\r\n" packetdata

      and done a Payload Replace

      it seems to work --

      does any one have a better idea ? or a better implementation ..

  • Dear Abbas,

     

    I was going to offer you the solution that you put in place. however it should be optimized to the maximum by applying rewrite only on very specific URLs.

     

    I don't see how we can do otherwise without rewriting the payload ...

    Haven't you try or modifying the Java application? it would be easier to correct the problem at the source.

     

    keep me in touch if sou need help for irule ...

    regards

    • MAbbas's avatar
      MAbbas
      Icon for Cirrus rankCirrus

      Thanks fro the reply youssef -

      yes - i have a if condition that selects the URL -- to update

      Question -- is there any way this can be done in http

      i tried doing a replace in HTTP::request -- but it does not allow me to update in that

      • BobVT's avatar
        BobVT
        Icon for Nimbostratus rankNimbostratus

        MAbbas - Do you have the complete iRUle you used that worked? I am facing a similar issue but have not been having any success.