cURL / Mailing Lists / curl-users / Single Mail

curl-users

Query regarding using https/post method

From: Rajesh Tewari <rtewari_at_ymail.com>
Date: Tue, 16 Dec 2008 20:15:04 +0530 (IST)

Hi, I'm facing one issue. For that I went through the FAQ list, unfortunately I didn't get the solution there. In order to see and modify page details using curl from within script(All three steps part of the same script). I'm trying below things. I'm able to see the page details but when I try to delete/add(in below example delete operation is tried) few things on the same form, it throws the same page and the deleted information is not saved. 1) curl -s -k https://localhost:443/v/ -c /tmp/cookies.txt > /dev/null 2) curl -k https://localhost:443/v/s_check \ --user-agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18)Gecko/20081029 Firefox/2.0.0.18' \ -b /tmp/cookies.txt \ -e https://localhost:443/v/ \ -L https://localhost:443/v/ \ -d "j_username=test&j_password=test&logon=Logon" >> /tmp/out.html 3) # # Delete a trap destination. # curl -v -s -k https://localhost:443/v/snmpT.jsf \ --user-agent 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18)Gecko/20081029 Firefox/2.0.0.18' \ --max-time 60 \ -b /tmp/cookies.txt \ -e https://localhost:443/v/snmpT.jsf?initializeBean=true \ -d "snmpTrapListForm%3AsnmpTrapListDataTable%3A2%3AelementSelected=on&snmpTrapListForm%3A_id55=Delete&snmpTrapListForm=snmpTrapListForm&snmpTrapListForm%3A_idcl=&snmpTrapID=" >>/tmp/out.html # # The verbose output says: # > POST /v/snmpT.jsf HTTP/1.1 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.18)Gecko/20081029 Firefox/2.0.0.18 Host: localhost Pragma: no-cache Accept: */* Referer: https://localhost:443/v/snmpT.jsf?initializeBean=true Cookie: JSESSIONID=4F35D6CD518CD1C18F470F5BAFC26501 Content-Length: 169 Content-Type: application/x-www-form-urlencoded snmpTrapListForm%3AsnmpTrapListDataTable%3A2%3AelementSelected=on&snmpTrapListForm%3A_id55=Delete&snmpTrapListForm=snmpTrapListForm&snmpTrapListForm%3A_idcl=&snmpTrapID=< HTTP/1.1 200 OK So it return 200 OK. I want to know is it the case of 'recursive post'. And if not Can anyone please help me understand where I'm wrong. Thanks, Rajesh Add more friends to your messenger and enjoy! Go to http://messenger.yahoo.com/invite/

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2008-12-16