Forum Discussion

jahaan2010_3990's avatar
jahaan2010_3990
Icon for Nimbostratus rankNimbostratus
Oct 26, 2010

HTTP POST Redirect (I RTM)

Hi Everyone,

 

 

I am trying to write a rule that will redirect an HTTP POST request.

 

 

Ex:

 

 

POST /path/foo?bar HTTP /1.1

 

...

 

Host: foobar.com

 

Cache-Control....\r\n

 

\r\n

 

&x=y&z=d

 

 

I want it do redirect like so:

 

 

POST /path/foo?bar HTTP /1.1

 

...

 

Host: deadbeef.com

 

cache-control...\r\n

 

\r\n

 

&x=y&z=d

 

 

From other forum posts it seems this isn't really possible? If not, I would normally be OK just re-writing this to an HTTP GET (just reach each POST field via getfield()), but the data is approximately 60k characters (most browsers do not support > 2048 chars for GET data). Assuming POST -> POST is not possible, is there any way I can convert to HTTP GET and only use the first 'X' bytes of the POST data? (truncate)

 

 

Thanks

 

 

 

1 Reply

  • Nat posted a possible solution for handling POST redirects with Javascript instead here:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&aft=1172096&afc=1172391

     

     

    Aaron