Changeset 20544

Show
Ignore:
Timestamp:
10/03/08 02:53:29 (3 months ago)
Author:
int128
Message:

ぬるぽ対策

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/java/misc/http-cookie-parser/trunk/webapp/WEB-INF/httpCookieTest.jsp

    r20542 r20544  
    4646 
    4747<% 
    48 String cookieRaw = (String) request.getHeaders("cookie").nextElement(); 
     48Enumeration cookies = request.getHeaders("cookie"); 
     49if(cookies.hasMoreElements()) { 
     50        String cookieRaw = (String) request.getHeaders("cookie").nextElement(); 
    4951%> 
    5052<table border> 
    5153<% 
    52 for(String part : cookieRaw.split("; +")) { 
    53         String key = part.substring(0, part.indexOf('=')); 
    54         String value = part.substring(part.indexOf('=')+1); 
     54        for(String part : cookieRaw.split("; +")) { 
     55                String key = part.substring(0, part.indexOf('=')); 
     56                String value = part.substring(part.indexOf('=')+1); 
    5557%> 
    5658        <tr><td><%= key %></td><td><%= value %></td></tr> 
    5759<% 
     60        } 
    5861} 
    5962%>