Skip to content

Instantly share code, notes, and snippets.

@canavese
Created June 21, 2012 20:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save canavese/2968371 to your computer and use it in GitHub Desktop.
Save canavese/2968371 to your computer and use it in GitHub Desktop.
VCR cassette resulting in "undefined method `headers' for nil:NilClass" (from second request)
undefined method `headers' for nil:NilClass
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/library_hooks/fakeweb.rb:118:in `response_hash'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/library_hooks/fakeweb.rb:127:in `with_exclusive_fakeweb_stub'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/library_hooks/fakeweb.rb:81:in `on_stubbed_by_vcr_request'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/request_handler.rb:25:in `handle'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/library_hooks/fakeweb.rb:30:in `handle'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/vcr-2.2.2/lib/vcr/library_hooks/fakeweb.rb:167:in `request_with_vcr'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/net-http-persistent-2.7/lib/net/http/persistent.rb:811:in `request'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/mechanize-2.5/lib/mechanize/http/agent.rb:258:in `fetch'
~/.rvm/gems/ruby-1.9.3-p125@neighboring/gems/mechanize-2.5/lib/mechanize.rb:407:in `get'
[Cassette: 'undefined_method_headers'] Initialized with options: {:record=>:once, :match_requests_on=>[:method, :uri], :allow_unused_http_interactions=>true, :serialize_with=>:yaml, :persist_with=>:file_system}
[fakeweb] Handling request: [post https://ecare.testdomain.com/p_login.asp] (disabled: false)
[Cassette: 'undefined_method_headers'] Initialized HTTPInteractionList with request matchers [:method, :uri] and 3 interaction(s): { [post https://ecare.testdomain.com/p_login.asp] => [302 "<head><title>Object moved</title></head>\n<body><h1>Object Moved</h1>This object "], [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] => [200 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/st"], [get https://ecare.testdomain.com/MyAccount/i_chgpin.asp] => [200 "\r\n<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/"] }
[Cassette: 'undefined_method_headers'] Checking if [post https://ecare.testdomain.com/p_login.asp] matches [post https://ecare.testdomain.com/p_login.asp] using [:method, :uri]
[Cassette: 'undefined_method_headers'] method (matched): current request [post https://ecare.testdomain.com/p_login.asp] vs [post https://ecare.testdomain.com/p_login.asp]
[Cassette: 'undefined_method_headers'] uri (matched): current request [post https://ecare.testdomain.com/p_login.asp] vs [post https://ecare.testdomain.com/p_login.asp]
[Cassette: 'undefined_method_headers'] Found matching interaction for [post https://ecare.testdomain.com/p_login.asp] at index 0: [302 "<head><title>Object moved</title></head>\n<body><h1>Object Moved</h1>This object "]
[fakeweb] Identified request type (stubbed_by_vcr) for [post https://ecare.testdomain.com/p_login.asp]
[fakeweb] Handling request: [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] (disabled: false)
[Cassette: 'undefined_method_headers'] Checking if [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] matches [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] using [:method, :uri]
[Cassette: 'undefined_method_headers'] method (matched): current request [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] vs [get https://ecare.testdomain.com/MyAccount/acct_summary.asp]
[Cassette: 'undefined_method_headers'] uri (matched): current request [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] vs [get https://ecare.testdomain.com/MyAccount/acct_summary.asp]
[Cassette: 'undefined_method_headers'] Found matching interaction for [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] at index 0: [200 "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/st"]
[fakeweb] Identified request type (stubbed_by_vcr) for [get https://ecare.testdomain.com/MyAccount/acct_summary.asp]
[fakeweb] Handling request: [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] (disabled: false)
[fakeweb] Identified request type (stubbed_by_vcr) for [get https://ecare.testdomain.com/MyAccount/acct_summary.asp]
[Cassette: 'undefined_method_headers'] Checking if [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] matches [get https://ecare.testdomain.com/MyAccount/i_chgpin.asp] using [:method, :uri]
[Cassette: 'undefined_method_headers'] method (matched): current request [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] vs [get https://ecare.testdomain.com/MyAccount/i_chgpin.asp]
[Cassette: 'undefined_method_headers'] uri (did not match): current request [get https://ecare.testdomain.com/MyAccount/acct_summary.asp] vs [get https://ecare.testdomain.com/MyAccount/i_chgpin.asp]
---
http_interactions:
- request:
method: post
uri: https://ecare.testdomain.com/p_login.asp
body:
encoding: US-ASCII
string: Field_occupant=00&Field_account=10768&B1=Submit&loc=local&Field_pin=PASSWORD
headers:
accept:
- "*/*"
user-agent:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
accept-encoding:
- gzip,deflate,identity
accept-charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
accept-language:
- en-us,en;q=0.5
host:
- ecare.testdomain.com
content-type:
- application/x-www-form-urlencoded
content-length:
- "76"
referer:
- https://ecare.testdomain.com/login.asp?errormsg=
connection:
- keep-alive
keep-alive:
- 300
response:
status:
code: 302
message: Object moved
headers:
date:
- Thu, 21 Jun 2012 20:24:42 GMT
server:
- Microsoft-IIS/6.0
x-powered-by:
- ASP.NET
location:
- https://ecare.testdomain.com/menudir/main_Menu2.asp
content-length:
- "171"
content-type:
- text/html
set-cookie:
- ASPSESSIONIDQCRRSQAR=NOOAHIABHPKBNJGLLAGKMHNA; path=/
cache-control:
- private
body:
encoding: US-ASCII
string: |
<head><title>Object moved</title></head>
<body><h1>Object Moved</h1>This object may be found <a HREF="https://ecare.testdomain.com/menudir/main_Menu2.asp">here</a>.</body>
http_version: "1.1"
recorded_at: Thu, 21 Jun 2012 20:24:42 GMT
- request:
method: get
uri: https://ecare.testdomain.com/MyAccount/acct_summary.asp
body:
encoding: US-ASCII
string: ""
headers:
accept:
- "*/*"
user-agent:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
accept-encoding:
- gzip,deflate,identity
accept-charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
accept-language:
- en-us,en;q=0.5
cookie:
- ASPSESSIONIDQCRRSQAR=NOOAHIABHPKBNJGLLAGKMHNA
host:
- ecare.testdomain.com
referer:
- !ruby/object:URI::HTTPS
fragment:
host: ecare.testdomain.com
opaque:
parser:
password:
path: /menudir/main_Menu2.asp
port: 443
query:
registry:
scheme: https
user:
connection:
- keep-alive
keep-alive:
- 300
response:
status:
code: 200
message: OK
headers:
date:
- Thu, 21 Jun 2012 20:24:43 GMT
server:
- Microsoft-IIS/6.0
x-powered-by:
- ASP.NET
content-length:
- "5360"
content-type:
- text/html
cache-control:
- private
body:
encoding: US-ASCII
string: |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>eCARE - My Account</title>
</head>
<body>
<!--Current Account Information-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta http-equiv="Expires" content="" >
<title>eCARE - Current Account</title>
<link rel="stylesheet" type="text/css" href="http://testdomain.com/templates/yoo_blueprint/css/template.css">
<link rel="stylesheet" type="text/css" href="../ecare.css" media="screen">
<script type="text/javascript" src="../js/mootools-release-1.11.js"></script>
<script type="text/javascript" src="../js/yoo_iefix.js"></script>
<script type = "text/javascript">
var i =0;
function clearClass() {
for(i=0;i< top.frames['menu'].document.links.length;i++) {
if(top.frames['menu'].document.links[i].className) {
top.frames['menu'].document.links[i].className="";
}
}
}
var b=2;
function setActive(b) {
clearClass();
var a = top.frames["menu"].document.getElementById(b);
a.className="active";
//alert("Value: "+ b);
}
</script>
<!--[if lte IE 6]>
<link rel="stylesheet" type="text/css" href="http://testdomain.com/templates/yoo_blueprint/css/ie6hacks.css">
<style type="text/css">
img.pngfix { behavior: url(../js/iepngfix/iepngfix.htc) }
</style>
<![endif]-->
</head>
<body>
<div class="floatbox">
<img src="../images/logo_ampA.png" width="100" height="100" class="float-left pngfix" style="position:absolute;top:10px;left:20px;z-index:1000"/>
<h3 class="pagehead roundleft" style="background:#ffe938;color:#646464;text-align:right;font-weight:normal;overflow:visible;margin-top:15px" >Manage Your AMP Account</h3>
</div>
<div class="ecare floatbox" style="border-left:1px solid #e1e1e1">
<div style="width:95%; padding:5px; border:10px solid gray; border-color:#999900; border-style:double; margin-top:30px; margin-bottom:10px; float:right; color:black; background:#FCFBA3;">
<center><b>Now, you can receive your electric bill ONLINE! eBill is here! <a href="https://ecare.testdomain.com/MyAccount/i_chgpin.asp"><br>Click here to sign up.</a></b></center></div>
<a href="../Payments/i_mkpayment_ccck.asp" style="display:block;float:right;color:red;font-weight:700" onClick="setActive(3);">PAY YOUR BILL</a>
<div id="acct">
<ul class="topleft">
<li><span class="ampgreen"><b>FIRST LAST </b></span></li>
<li>Acct #&nbsp;10768-00</li>
<li>1234 NAME AVE </li>
<li>CITY CA 99999- </li>
<li></li>
<li>Rate: D1H </li>
</ul>
<ul class="topright">
<li> Acct Balance:$70.98</li>
<li> Due Date:&nbsp;Jun 25, 2012</li>
<!-- <li><a href="../Payments/i_mkpayment_ccck.asp" target="_self" ><span>Pay Bill</span></a></li>-->
</ul>
</div>
</div>
<!--<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-80541-5");
pageTracker._trackPageview();
} catch(err) {}</script></body>
</html>
-->
<!--List of Accounts-->
<html>
<head>
</head>
<body>
<div class="section floatbox">
<h6>Your Account(s)</h6>
</div>
<div class="ecare" style="height:900px;width:98%">
<table class="main" border="0" cellpadding="0" cellspacing="0">
<tr class="head">
<td align="left">
Account #
</td>
<td align="left">Name</td>
<td align="left">
Service Address
</td>
<td align="right" >
Balance
</td>
</tr>
<tr>
<td align="left" ><a href='/MyAccount/p_pickacct.asp?list_accounts=10768' onclick="test(4);" >10768-00&nbsp;</a></td>
<td >FIRST LAST &nbsp;</td>
<td >1234&nbsp;NAME AVE
</td>
<td align="right" >
$70.98</td>
</tr>
<tr>
<td align="right" colspan="3">
Total Balance:
</td>
<td align="right">
<a target='innerframe' href='../Payments/i_mkpayment_ccck.asp'><b>$70.98</b></a></td></tr><tr><td valign='middle' align='right' colspan='4'><a target='innerframe' href='../Payments/i_mkpayment_ccck.asp'><b>Pay Net Balance</b></a></td></tr>
</table>
<span style="font-style:italic;font-size:10px">(Click on the Account Number for details)</span>
</div>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
try {
var pageTracker = _gat._getTracker("UA-80541-5");
pageTracker._trackPageview();
} catch(err) {}</script></body>
</html>
<script type="text/javascript">
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</s
</html>
http_version: "1.1"
recorded_at: Thu, 21 Jun 2012 20:24:43 GMT
- request:
method: get
uri: https://ecare.testdomain.com/MyAccount/i_chgpin.asp
body:
encoding: US-ASCII
string: ""
headers:
accept:
- "*/*"
user-agent:
- Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.4b) Gecko/20030516 Mozilla Firebird/0.6
accept-encoding:
- gzip,deflate,identity
accept-charset:
- ISO-8859-1,utf-8;q=0.7,*;q=0.7
accept-language:
- en-us,en;q=0.5
cookie:
- ASPSESSIONIDQCRRSQAR=NOOAHIABHPKBNJGLLAGKMHNA
host:
- ecare.testdomain.com
referer:
- !ruby/object:URI::HTTPS
fragment:
host: ecare.testdomain.com
opaque:
parser:
password:
path: /navigation/leftMenu.asp
port: 443
query: reloaded=true
registry:
scheme: https
user:
connection:
- keep-alive
keep-alive:
- 300
response:
status:
code: 200
message: OK
headers:
date:
- Thu, 21 Jun 2012 20:24:44 GMT
server:
- Microsoft-IIS/6.0
x-powered-by:
- ASP.NET
content-length:
- "10227"
content-type:
- text/html
cache-control:
- private
body:
encoding: US-ASCII
string: "\r\n\
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01//EN\" \"http://www.w3.org/TR/html4/strict.dtd\">\r\n\
<html>\r\n\
\r\n\
<head>\r\n\
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=windows-1252\">\r\n\
<META http-equiv=\"Expires\" content=\"\"><!-- (Force page reload) -->\r\n\
<script type=\"text/javascript\" src=\"tabbed.js\"></script>\r\n\
<title>Change Account PIN</title>\r\n\
<!--<link rel=\"stylesheet\" type=\"text/css\" href=\"../primary.css\">-->\r\n <link rel=\"stylesheet\" type=\"text/css\" href=\"http://testdomain.com/templates/yoo_blueprint/css/template.css\">\r\n\
<link rel=\"stylesheet\" type=\"text/css\" href=\"../ecare.css\" media=\"screen\">\r\n\
\r\n\
</head>\r\n\
<script type=\"text/javascript\">\r\n\
\r\n\
function setfocus()\r\n\
\t{\r\n\
\tdocument.FrontPage_Form1.oldpin.focus();\r\n\
\t}\r\n\
\r\n\
<!-- This script and many more are available free online at -->\r\n\
<!-- The JavaScript Source!! http://javascript.internet.com -->\r\n\
\r\n\
<!-- V1.1.3: Sandeep V. Tamhankar (stamhankar@hotmail.com) -->\r\n\
<!-- Original: Sandeep V. Tamhankar (stamhankar@hotmail.com) -->\r\n\
<!-- Changes:\r\n\
/* 1.1.4: Fixed a bug where upper ASCII characters (i.e. accented letters\r\n\
international characters) were allowed.\r\n\
\r\n\
1.1.3: Added the restriction to only accept addresses ending in two\r\n\
letters (interpreted to be a country code) or one of the known\r\n\
TLDs (com, net, org, edu, int, mil, gov, arpa), including the\r\n\
new ones (biz, aero, name, coop, info, pro, museum). One can\r\n\
easily update the list (if ICANN adds even more TLDs in the\r\n\
future) by updating the knownDomsPat variable near the\r\n\
top of the function. Also, I added a variable at the top\r\n\
of the function that determines whether or not TLDs should be\r\n\
checked at all. This is good if you are using this function\r\n\
internally (i.e. intranet site) where hostnames don't have to \r\n\
conform to W3C standards and thus internal organization e-mail\r\n\
addresses don't have to either.\r\n\
Changed some of the logic so that the function will work properly\r\n\
with Netscape 6.\r\n\
\r\n\
1.1.2: Fixed a bug where trailing . in e-mail address was passing\r\n\
(the bug is actually in the weak regexp engine of the browser; I\r\n\
simplified the regexps to make it work).\r\n\
\r\n\
1.1.1: Removed restriction that countries must be preceded by a domain,\r\n\
so abc@host.uk is now legal. However, there's still the \r\n\
restriction that an address must end in a two or three letter\r\n\
word.\r\n\
\r\n\
1.1: Rewrote most of the function to conform more closely to RFC 822.\r\n\
\r\n\
1.0: Original */\r\n\
// -->\r\n\
\r\n\
<!-- Begin\r\n\
function emailCheck (emailStr) {\r\n\
\r\n\
/* The following variable tells the rest of the function whether or not\r\n\
to verify that the address ends in a two-letter country or well-known\r\n\
TLD. 1 means check it, 0 means don't. */\r\n\
\r\n\
var checkTLD=1;\r\n\
\r\n\
/* The following is the list of known TLDs that an e-mail address must end with. */\r\n\
\r\n\
var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum)$/;\r\n\
\r\n\
/* The following pattern is used to check if the entered e-mail address\r\n\
fits the user@domain format. It also is used to separate the username\r\n\
from the domain. */\r\n\
\r\n\
var emailPat=/^(.+)@(.+)$/;\r\n\
\r\n\
/* The following string represents the pattern for matching all special\r\n\
characters. We don't want to allow special characters in the address. \r\n\
These characters include ( ) < > @ , ; : \\ \" . [ ] */\r\n\
\r\n\
var specialChars=\"\\\\(\\\\)><@,;:\\\\\\\\\\\\\\\"\\\\.\\\\[\\\\]\";\r\n\
\r\n\
/* The following string represents the range of characters allowed in a \r\n\
username or domainname. It really states which chars aren't allowed.*/\r\n\
\r\n\
var validChars=\"\\[^\\\\s\" + specialChars + \"\\]\";\r\n\
\r\n\
/* The following pattern applies if the \"user\" is a quoted string (in\r\n\
which case, there are no rules about which characters are allowed\r\n\
and which aren't; anything goes). E.g. \"jiminy cricket\"@disney.com\r\n\
is a legal e-mail address. */\r\n\
\r\n\
var quotedUser=\"(\\\"[^\\\"]*\\\")\";\r\n\
\r\n\
/* The following pattern applies for domains that are IP addresses,\r\n\
rather than symbolic names. E.g. joe@[123.124.233.4] is a legal\r\n\
e-mail address. NOTE: The square brackets are required. */\r\n\
\r\n\
var ipDomainPat=/^\\[(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\.(\\d{1,3})\\]$/;\r\n\
\r\n\
/* The following string represents an atom (basically a series of non-special characters.) */\r\n\
\r\n\
var atom=validChars + '+';\r\n\
\r\n\
/* The following string represents one word in the typical username.\r\n\
For example, in john.doe@somewhere.com, john and doe are words.\r\n\
Basically, a word is either an atom or quoted string. */\r\n\
\r\n\
var word=\"(\" + atom + \"|\" + quotedUser + \")\";\r\n\
\r\n\
// The following pattern describes the structure of the user\r\n\
\r\n\
var userPat=new RegExp(\"^\" + word + \"(\\\\.\" + word + \")*$\");\r\n\
\r\n\
/* The following pattern describes the structure of a normal symbolic\r\n\
domain, as opposed to ipDomainPat, shown above. */\r\n\
\r\n\
var domainPat=new RegExp(\"^\" + atom + \"(\\\\.\" + atom +\")*$\");\r\n\
\r\n\
/* Finally, let's start trying to figure out if the supplied address is valid. */\r\n\
\r\n\
/* Begin with the coarse pattern to simply break up user@domain into\r\n\
different pieces that are easy to analyze. */\r\n\
\r\n\
var matchArray=emailStr.match(emailPat);\r\n\
\r\n\
if (matchArray==null) {\r\n\
\r\n\
/* Too many/few @'s or something; basically, this address doesn't\r\n\
even fit the general mould of a valid e-mail address. */\r\n\
\r\n\
alert(\"Email address seems incorrect (check @ and .'s)\");\r\n\
return false;\r\n\
}\r\n\
var user=matchArray[1];\r\n\
var domain=matchArray[2];\r\n\
\r\n\
// Start by checking that only basic ASCII characters are in the strings (0-127).\r\n\
\r\n\
for (i=0; i<user.length; i++) {\r\n\
if (user.charCodeAt(i)>127) {\r\n\
alert(\"Ths username contains invalid characters.\");\r\n\
return false;\r\n }\r\n\
}\r\n\
for (i=0; i<domain.length; i++) {\r\n\
if (domain.charCodeAt(i)>127) {\r\n\
alert(\"Ths domain name contains invalid characters.\");\r\n\
return false;\r\n }\r\n\
}\r\n\
\r\n\
// See if \"user\" is valid \r\n\
\r\n\
if (user.match(userPat)==null) {\r\n\
\r\n\
// user is not valid\r\n\
\r\n\
alert(\"The username doesn't seem to be valid.\");\r\n\
return false;\r\n\
}\r\n\
\r\n\
/* if the e-mail address is at an IP address (as opposed to a symbolic\r\n\
host name) make sure the IP address is valid. */\r\n\
\r\n\
var IPArray=domain.match(ipDomainPat);\r\n\
if (IPArray!=null) {\r\n\
\r\n\
// this is an IP address\r\n\
\r\n\
for (var i=1;i<=4;i++) {\r\n\
if (IPArray[i]>255) {\r\n\
alert(\"Destination IP address is invalid!\");\r\n\
return false;\r\n }\r\n\
}\r\n\
return true;\r\n\
}\r\n\
\r\n\
// Domain is symbolic name. Check if it's valid.\r\n \r\n\
var atomPat=new RegExp(\"^\" + atom + \"$\");\r\n\
var domArr=domain.split(\".\");\r\n\
var len=domArr.length;\r\n\
for (i=0;i<len;i++) {\r\n\
if (domArr[i].search(atomPat)==-1) {\r\n\
alert(\"The domain name does not seem to be valid.\");\r\n\
return false;\r\n }\r\n\
}\r\n\
\r\n\
/* domain name seems valid, but now make sure that it ends in a\r\n\
known top-level domain (like com, edu, gov) or a two-letter word,\r\n\
representing country (uk, nl), and that there's a hostname preceding \r\n\
the domain or country. */\r\n\
\r\n\
if (checkTLD && domArr[domArr.length-1].length!=2 && \r\n\
domArr[domArr.length-1].search(knownDomsPat)==-1) {\r\n\
alert(\"The address must end in a well-known domain or two letter \" + \"country.\");\r\n\
return false;\r\n\
}\r\n\
\r\n\
// Make sure there's a host name preceding the domain.\r\n\
\r\n\
if (len<2) {\r\n\
alert(\"This address is missing a hostname!\");\r\n\
return false;\r\n\
}\r\n\
\r\n\
// If we've gotten this far, everything's valid!\r\n\
return true;\r\n\
}\r\n\
\r\n\
// End -->\r\n\
</script>\r\n\
\r\n\
<body>\r\n\
\r\n\
<div class=\"ecare\">\r\n\
<h4>User Preferences</h4>\r\n\
<h6>Change Your Password, and/or Sign Up for eBilling, and/or Sign up for eBill Notification</h6>\r\n\
<div class=\"section floatbox\">\r\n \r\n\
\r\n \r\n\
\t\r\n\
<script language=\"VBScript\" type=\"text/vbscript\">\r\n\
\r\n\
<!--\r\n\
function FrontPage_Form1_onsubmit()\r\n Set theForm = document.FrontPage_Form1\r\n\
\r\n If (theForm.newpin1.value = \"\") Then\r\n 'MsgBox \"Please enter a value for the \"\"newpin1\"\" field.\", 0, \"Validation Error\"\r\n 'theForm.newpin1.focus()\r\n 'FrontPage_Form1_onsubmit = False\r\n 'Exit Function\r\n End If\r\n\
\r\n If (theForm.newpin2.value = \"\") Then\r\n 'MsgBox \"Please enter a value for the \"\"newpin2\"\" field.\", 0, \"Validation Error\"\r\n 'theForm.newpin2.focus()\r\n 'FrontPage_Form1_onsubmit = False\r\n 'Exit Function\r\n End If\r\n FrontPage_Form1_onsubmit = True \r\n\
End Function\r\n\
--></script>\r\n\
\r\n\
<form class=\"cmxform\" style=\"width:80%;float:left\" method=\"post\" /action=\"p_chgpin.asp\" name=\"FrontPage_Form1\">\r\n\
<fieldset class=\"blue\">\r\n \r\n <div><label>Old Password:</label><br>\r\n <input type=\"password\" name=\"oldpin\"class=\"text\" size=\"14\" tabindex=\"1\"></div>\r\n \r\n <div><label>New Password:</label><br>\r\n \r\n <input type=\"password\" name=\"newpin1\" class=\"text\" size=\"14\" tabindex=\"1\"></div>\r\n \r\n <div><label>Re-enter new Password:</label><br>\r\n \r\n \r\n <input type=\"password\" name=\"newpin2\" class=\"text\" size=\"14\" tabindex=\"1\"></div>\r\n \r\n\
\r\n <tr><td bgcolor='cccccc' width='180' height='24'><label><div><hr>eBilling Options:</label></div></td><td><input type=\"radio\" name=\"email_yn\" value=\"N\" checked><div>No, I don't want eBilling</div></td><td><input type=\"radio\" name=\"email_yn\" value=\"Y\" ><div>Yes, I want eBilling</div></td><td><input type=\"radio\" name=\"email_yn\" value=\"B\" ><div>Paper and eBilling</td></tr>\r\n\
\r\n \r\n <div> <hr><label>Change or confirm your Email Address:</label>\r\n \r\n \r\n <input type=\"text\" class=\"text\" name=\"emailaddr\" value=\"paul@canavese.org\" onChange=\"if(!emailCheck(this.value)) {this.value='';this.focus();return false; }\" size=\"35\" ></div>\r\n \r\n \r\n \r\n \r\n <hr><input type=\"submit\" name=\"I1\" value=\"Submit\"> <input type=\"button\" name=\"but_clean\" value=\"Reset\" onClick=\"document.FrontPage_Form1.reset();return false;\">\r\n \r\n </fieldset> \r\n </form>\r\n\
</div>\r\n <p style=\"width:80%\">\r\n Your new password must be a minimum\r\n length of 4 characters and a maximum of length of 10 \r\n characters and can include both numbers and letters.</p>\r\n \r\n \r\n\
</div>\r\n\
\r\n\
<script type=\"text/javascript\">\r\n\
var gaJsHost = ((\"https:\" == document.location.protocol) ? \"https://ssl.\" : \"http://www.\");\r\n\
document.write(unescape(\"%3Cscript src='\" + gaJsHost + \"google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E\"));\r\n\
</script>\r\n\
<script type=\"text/javascript\">\r\n\
try {\r\n\
var pageTracker = _gat._getTracker(\"UA-80541-5\");\r\n\
pageTracker._trackPageview();\r\n\
} catch(err) {}</script></body>\r\n\
</html>"
http_version: "1.1"
recorded_at: Thu, 21 Jun 2012 20:24:44 GMT
recorded_with: VCR 2.2.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment