[jboss-cvs] JBossRemoting/src/main/org/jboss/remoting/transport/http ...

Ovidiu Feodorov ovidiu.feodorov at jboss.com
Wed Jan 24 13:53:41 EST 2007


  User: ovidiu  
  Date: 07/01/24 13:53:41

  Modified:    src/main/org/jboss/remoting/transport/http  Tag:
                        remoting_2_x HTTPClientInvoker.java
  Log:
  http://jira.jboss.org/jira/browse/JBREM-688
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.31.2.1  +15 -1     JBossRemoting/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: HTTPClientInvoker.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossRemoting/src/main/org/jboss/remoting/transport/http/HTTPClientInvoker.java,v
  retrieving revision 1.31
  retrieving revision 1.31.2.1
  diff -u -b -r1.31 -r1.31.2.1
  --- HTTPClientInvoker.java	29 Oct 2006 20:40:07 -0000	1.31
  +++ HTTPClientInvoker.java	24 Jan 2007 18:53:41 -0000	1.31.2.1
  @@ -199,7 +199,21 @@
               {
                  metadata = new HashMap();
               }
  -            metadata.putAll(headers);
  +
  +            // sometimes I get headers with "null" keys (I don't know who's fault is it), so I need
  +            // to clean the header map, unless I want to get an NPE thrown by metadata.putAll()
  +            if (headers != null)
  +            {
  +               for(Iterator i = headers.entrySet().iterator(); i.hasNext(); )
  +               {
  +                  Map.Entry e = (Map.Entry)i.next();
  +                  if (e.getKey() != null)
  +                  {
  +                     metadata.put(e.getKey(), e.getValue());
  +                  }
  +               }
  +            }
  +
               metadata.put(HTTPMetadataConstants.RESPONSE_CODE_MESSAGE, conn.getResponseMessage());
               metadata.put(HTTPMetadataConstants.RESPONSE_CODE, new Integer(responseCode));
   
  
  
  



More information about the jboss-cvs-commits mailing list