[Htmlparser-cvs] htmlparser/src/org/htmlparser/http ConnectionManager.java,1.10,1.11
Brought to you by:
derrickoswald
From: Derrick O. <der...@us...> - 2006-05-30 01:30:20
|
Update of //cvsroot/htmlparser/htmlparser/src/org/htmlparser/http In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv12701 Modified Files: ConnectionManager.java Log Message: Handle bad cookie names. Traps cookie name problems, but ignores any following cookies. Index: ConnectionManager.java =================================================================== RCS file: //cvsroot/htmlparser/htmlparser/src/org/htmlparser/http/ConnectionManager.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** ConnectionManager.java 14 Apr 2006 22:18:47 -0000 1.10 --- ConnectionManager.java 30 May 2006 01:30:16 -0000 1.11 *************** *** 1067,1072 **** if (null == cookie) { ! cookie = new Cookie (name, value); ! cookies.addElement (cookie); } else --- 1067,1081 ---- if (null == cookie) { ! try ! { ! cookie = new Cookie (name, value); ! cookies.addElement (cookie); ! } ! catch (IllegalArgumentException iae) ! { ! // should print a warning ! // for now just bail ! break; ! } } else *************** *** 1114,1124 **** } else ! { // error,? unknown attribute, // maybe just another cookie // not separated by a comma ! cookie = new Cookie (name, ! value); ! cookies.addElement (cookie); ! } } } --- 1123,1141 ---- } else ! // error,? unknown attribute, // maybe just another cookie // not separated by a comma ! try ! { ! cookie = new Cookie (name, ! value); ! cookies.addElement (cookie); ! } ! catch (IllegalArgumentException iae) ! { ! // should print a warning ! // for now just bail ! break; ! } } } |