cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context RequestSessionContext.java
Date Wed, 22 Oct 2003 14:24:39 GMT
cziegeler    2003/10/22 07:24:39

  Modified:    src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context
                        RequestSessionContext.java
  Log:
  Test for invalid header name when generating request xml
  
  Revision  Changes    Path
  1.4       +8 -4      cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java
  
  Index: RequestSessionContext.java
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/blocks/session-fw/java/org/apache/cocoon/webapps/session/context/RequestSessionContext.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- RequestSessionContext.java	21 Oct 2003 12:39:15 -0000	1.3
  +++ RequestSessionContext.java	22 Oct 2003 14:24:39 -0000	1.4
  @@ -381,9 +381,13 @@
           Enumeration all = this.request.getHeaderNames();
           while (all.hasMoreElements() == true) {
               headerName = (String) all.nextElement();
  -            header = doc.createElementNS(null, headerName);
  -            headersElement.appendChild(header);
  -            header.appendChild(this.createTextNode(doc, this.request.getHeader(headerName)));
  +            try {
  +                header = doc.createElementNS(null, headerName);
  +                headersElement.appendChild(header);
  +                header.appendChild(this.createTextNode(doc, this.request.getHeader(headerName)));
  +            } catch (Exception ignore) {
  +                // if the header name is not a valid element name, we simply ignore it
  +            }
           }
       }
   
  
  
  

Mime
View raw message