curl-users
RE: curl and Javascript based submit form
Date: Wed, 1 Apr 2009 23:50:04 +0000
Here is the LiveHTTPHeader output. How can I repeat those actions with curl shell command ?.
====================================
http://localhost:8080/test/test.jsp?download=OK
GET /test/test.jsp?download=OK HTTP/1.1
Host: localhost:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.5) Gecko/2008120122 Firefox/3.0.5
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://localhost:8080/test/test.jsp
Cookie: JSESSIONID=xb3v6b3lo1qb
HTTP/1.x 200 OK
Date: Wed, 01 Apr 2009 23:47:18 GMT
Server: Jetty/5.1.x (Windows XP/5.1 x86 java/1.5.0_04
Content-Type: text/html;charset=ISO-8859-1
Content-Length: 441
=================================================
From: rossbertoloni_at_hotmail.com
To: curl-users_at_cool.haxx.se
Subject: curl and Javascript based submit form
Date: Wed, 1 Apr 2009 19:58:40 +0000
Any idea how I can use curl to download file from Javascript based submit button?
Here is the form page(test.jsp) :
<html>
<head>
<title>Untitled</title>
<SCRIPT language="JavaScript1.2">
function poponload()
{
var url='http://localhost:8080/test/test_20090319.zip';
testwindow= window.open (url);
}
</script>
</head>
<body>
<form method="GET" action="test.jsp" onsubmit="javascript:poponload()">
<input type="submit"
name="download"
value="OK"
/>
</form>
</body>
</html>
Internet Explorer 8 makes surfing easier. Get it now!
_________________________________________________________________
Share photos with friends on Windows Live Messenger
http://go.microsoft.com/?linkid=9650734
-------------------------------------------------------------------
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 2009-04-02