Hi,
I have to add a 6kb variable in post or get method of the url and forward the request.
Can you help or show an example.
Thanks a lot in advance,
Pradeep
Hi,
I have to add a 6kb variable in post or get method of the url and forward the request.
Can you help or show an example.
Thanks a lot in advance,
Pradeep
Every POST and GET? At the end of the URL?
yes, I have to add in post
OK, so every single POST, not GETs? At the end of the URL? Please clarify.
Let me tell my situation more clearly,
1. when my irule gets saml requests, It contains the xml comes as post request.
2. I save the saml XML in a two cookie(as the size is big).
3. do 302 redirection for and with same url (NO XML now)
4. do the renegotiation add cert subject in header, done.
5. I have to add the XMl back to the post and forward the request.
now rest all I have done, the 5th point is the issue.
OK. So if this is all within one connection and the client is still sending a POST it shouldn’t be a problem. Can we just save the POST data at 2) and then completely overwrite the POST request at 5)?
at 5 its a plain redirection done by us only, (client not involved) and need to add post data.
info: Its a working code (without post kind of data)
i think client may create a new connection on step 3 (redirection). you mentioned saving xml to cookies on step 2. how do you get the xml in the cookies on step 5?
Steve, sorry i got your message but was very busy on another stuff. by the way, i cannot reply your message. i got bounced back to devcentral home page when clicking at reply.
Hey, that simple using [HTTP::cookie XMLCookie1]
but I need to add these cookie data as post (or get) and forward the request, If you understood my problem give me the example,
to solve. it.
or forget about cookie,
I simple need to add some junk data in post and forward the request, please give example.
Thanks
Pradeep
i am not familiar with saml. if you can post example of header and payload in each step, it might be easier to suggest.
nitass, understood, I know what it’s like. You can email me at … if necessary.
What I understood is, you are not concentrating on the question, only asking more unnecessary question, you don’t need to know saml, only I said I need to add some data as post to the incoming request and forward them.
The question is very simple and straight.
If you are still having the problem in understanding the question. Please don’t post back.
Sorry for being hard.
Pradeep
i never asked you on the question. what i am not sure is the situation around the question. i just want to test with the similar situation. hope you don’t misunderstand me.
e.g.
(i want to modify my code but cannot update here. it got blocked by asm. will post it in the next reply dialog)
Posted By Pradeep Kandala on 11/24/2012 08:36 PM
What I understood is, you are not concentrating on the question, only asking more unnecessary question, you don’t need to know saml, only I said I need to add some data as post to the incoming request and forward them.
The question is very simple and straight.
If you are still having the problem in understanding the question. Please don’t post back.
Sorry for being hard.
Pradeep
Hi Pradeep,
Please show respect to the people trying to help you when you’re posting. If you do, you’ll find a lot of people here who are happy to provide their expertise on their own time. Nitass and Steve have been two of the best contributors on this site.
Aaron
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
log local0. ""
if { [HTTP::method] eq "POST" and $isretry == 0 } {
set origin_len [HTTP::header "Content-Length"]
set origin_type [HTTP::header "Content-Type"]
HTTP::collect $origin_len
}
}
when HTTP_REQUEST_DATA {
log local0. ""
set origin_payload [HTTP::payload]
HTTP::respond 302 Location http://[HTTP::host][HTTP::uri]
TCP::collect
}
when CLIENT_ACCEPTED {
log local0. ""
set isretry 0
}
when CLIENT_DATA {
log local0. ""
set newpayload [string map [list "GET" "POST" "\r\n\r\n" "\r\nContent-Length: ${origin_len}\r\nContent-Type: ${origin_type}\r\n\r\n${origin_payload}"] [TCP::payload]]
TCP::payload replace 0 [TCP::payload length] ""
TCP::payload replace 0 0 $newpayload
set isretry 1
TCP::release
}
}
on client
[root@centos251 ~] curl -i -L -b cookies.txt -c cookies.txt -d "test123456" http://172.28.19.79
HTTP/1.0 302 Found
Location: http://172.28.19.79/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
HTTP/1.1 200 OK
Date: Sun, 25 Nov 2012 20:13:28 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sat, 27 Oct 2012 03:22:35 GMT
ETag: "4183f3-59-f28f94c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
...snipped...
on bigip
[root@ve10:Active] config tail /var/log/ltm
Nov 26 03:59:12 local/tmm notice tmm[7926]: 013e0001:5: Tcpdump starting bcast on :::0 from 127.1.1.1:57624
Nov 26 03:59:17 local/tmm info tmm[7926]: Rule myrule :
Nov 26 03:59:17 local/tmm info tmm[7926]: Rule myrule :
Nov 26 03:59:17 local/tmm info tmm[7926]: Rule myrule :
Nov 26 03:59:17 local/tmm info tmm[7926]: Rule myrule :
Nov 26 03:59:17 local/tmm info tmm[7926]: Rule myrule :
Nov 26 03:59:20 local/tmm notice tmm[7926]: 013e0002:5: Tcpdump stopping on 127.1.1.2:53186 from 127.1.1.1:57624
[root@ve10:Active] config ssldump -Aed -nni 0.0 port 80
New TCP connection 1: 172.28.19.251(38574) <-> 172.28.19.79(80)
1353873290.9627 (0.0009) C>S
---------------------------------------------------------------
POST / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
Content-Length: 10
Content-Type: application/x-www-form-urlencoded
test123456---------------------------------------------------------------
1353873290.9629 (0.0001) S>C
---------------------------------------------------------------
HTTP/1.0 302 Found
Location: http://172.28.19.79/
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
---------------------------------------------------------------
1353873290.9646 (0.0017) C>S
---------------------------------------------------------------
GET / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
---------------------------------------------------------------
New TCP connection 2: 200.200.200.10(38574) <-> 200.200.200.101(80)
1353873290.9668 (0.0009) C>S
---------------------------------------------------------------
POST / HTTP/1.1
User-Agent: curl/7.15.5 (i686-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
Host: 172.28.19.79
Accept: */*
Content-Length: 10
Content-Type: application/x-www-form-urlencoded
test123456---------------------------------------------------------------
1353873290.9718 (0.0050) S>C
---------------------------------------------------------------
HTTP/1.1 200 OK
Date: Sun, 25 Nov 2012 20:13:28 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sat, 27 Oct 2012 03:22:35 GMT
ETag: "4183f3-59-f28f94c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
...snipped...
---------------------------------------------------------------
1353873290.9719 (0.0072) S>C
---------------------------------------------------------------
HTTP/1.1 200 OK
Date: Sun, 25 Nov 2012 20:13:28 GMT
Server: Apache/2.2.3 (CentOS)
Last-Modified: Sat, 27 Oct 2012 03:22:35 GMT
ETag: "4183f3-59-f28f94c0"
Accept-Ranges: bytes
Content-Length: 89
Content-Type: text/html; charset=UTF-8
...snipped...
---------------------------------------------------------------
1 1353873290.9726 (0.0007) C>S TCP FIN
2 1353873290.9726 (0.0007) C>S TCP FIN
2 1353873290.9736 (0.0010) S>C TCP FIN
1 1353873290.9737 (0.0010) S>C TCP FIN