You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Ken Richard <ke...@aeseducation.com> on 2007/10/03 17:42:57 UTC

Transmission of XML with HttpClient 3-1

Hello.

 

I have been using httpclient for a long time without any issues.  Recently,
one of our installations has a problem where the XML coming back from the
server has a character being replaced with a \0.  We ran a WireShark trace
and the data is correct, but the wire trace from httpclient shows the null.
The server for this transaction is Jetty.  We are using the latest 3.1 jar
file.

 

Here is an excerpt from my log.  Note the /FIEL[0x0] on the last line.

 

Has anyone seen this before?  Do you have any recommendations?

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpParser

enter HttpParser.readLine(InputStream, String)

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpParser
enter HttpParser.readRawLine()

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.header
<< "[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpConnection
enter HttpConnection.getResponseInputStream()

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECTTRANSFER>[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECTSET classid="Teacher">[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECT type="com.aeseducation.model.Teacher"><FIELD
name="Title">Mr</FIELD><FIELD
name="Password">9abd3d9b983e99aa1fd94837498b0bea</FIELD><FIELD
name="IsGuest">false</FIELD><FIELD name="HomeAddress">q</FIELD><FIELD
name="HomeCity">q</FIELD><FIELD name="HomeState">CA</FIEL[0x0]><FIELD 

 

 

 

 


RE: Transmission of XML with HttpClient 3-1

Posted by Ken Richard <ke...@aeseducation.com>.
Sorry for two posts.  Here is some additional information.

The transmission works on the server through 127.0.0.1 but fails over the
network.  Server is Windows 2003 Server, Client is Windows XP.  JRE on the
client is 1.6 although we compiled for 1.5.


-----Original Message-----
From: Ken Richard [mailto:kenr@aeseducation.com] 
Sent: Wednesday, October 03, 2007 11:43 AM
To: httpclient-user@jakarta.apache.org
Subject: Transmission of XML with HttpClient 3-1

Hello.

 

I have been using httpclient for a long time without any issues.  Recently,
one of our installations has a problem where the XML coming back from the
server has a character being replaced with a \0.  We ran a WireShark trace
and the data is correct, but the wire trace from httpclient shows the null.
The server for this transaction is Jetty.  We are using the latest 3.1 jar
file.

 

Here is an excerpt from my log.  Note the /FIEL[0x0] on the last line.

 

Has anyone seen this before?  Do you have any recommendations?

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpParser

enter HttpParser.readLine(InputStream, String)

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpParser
enter HttpParser.readRawLine()

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.header
<< "[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,org.apache.commons.httpclient.HttpConnection
enter HttpConnection.getResponseInputStream()

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECTTRANSFER>[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECTSET classid="Teacher">[\r][\n]"

 

10/3/07 8:24 AM,main,DEBUG,httpclient.wire.content
<< "<DBOBJECT type="com.aeseducation.model.Teacher"><FIELD
name="Title">Mr</FIELD><FIELD
name="Password">9abd3d9b983e99aa1fd94837498b0bea</FIELD><FIELD
name="IsGuest">false</FIELD><FIELD name="HomeAddress">q</FIELD><FIELD
name="HomeCity">q</FIELD><FIELD name="HomeState">CA</FIEL[0x0]><FIELD 

 

 

 

 



---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


RE: Transmission of XML with HttpClient 3-1

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Thu, 2007-10-04 at 07:39 -0400, Ken Richard wrote:
> Around position 319 of the http client wire trace.  It happens on all
> computers in this school, but has not been observed in any of our other
> installations.  It happens on all transactions with XML data greater than
> 319 characters.  
> 
> I was able to patch by adding a 500 byte comment of known characters into
> the HTML and fixing up the data before it is parsed.  Obviously not the best
> solution.
> 
> I am pretty sure it is an environmental problem, but am not sure how to
> prove that.  There are multiple security packages installed on the
> workstations.
> 
> Do you know what processing takes place within java/http client before the

Nothing really fancy. HttpClient 3.x uses standard BufferedInputStream /
BufferedOutputStream to read from / write to the underlying socket

http://jakarta.apache.org/httpcomponents/httpclient-3.x/xref/org/apache/commons/httpclient/HttpConnection.html#745

and then wraps those streams with the logging decorators. That is it.

> http client wire trace is generated?  Could this be a character encoding
> mismatch or something?
> 

Unlikely.

You may want to try to reproduce the problem using a very simple Java
app that writes the request directly to the socket and reads the
response. Something similar to this:

http://jakarta.apache.org/httpcomponents/httpclient-3.x/sslguide.html#Troubleshooting

Oleg

> 
> -----Original Message-----
> From: Oleg Kalnichevski [mailto:olegk@apache.org] 
> Sent: Thursday, October 04, 2007 3:58 AM
> To: HttpClient User Discussion
> Subject: Re: Transmission of XML with HttpClient 3-1
> 
> On Wed, 2007-10-03 at 11:42 -0400, Ken Richard wrote:
> > Hello.
> > 
> >  
> > 
> > I have been using httpclient for a long time without any issues.
> Recently,
> > one of our installations has a problem where the XML coming back from the
> > server has a character being replaced with a \0.  We ran a WireShark trace
> > and the data is correct, but the wire trace from httpclient shows the
> null.
> > The server for this transaction is Jetty.  We are using the latest 3.1 jar
> > file.
> > 
> >  
> > 
> > Here is an excerpt from my log.  Note the /FIEL[0x0] on the last line.
> > 
> >  
> > 
> > Has anyone seen this before?  Do you have any recommendations?
> > 
> 
> Ken,
> 
> Does this \0 appear randomly at different locations or at the same one?
> How reproducible is this problem?  
> 
> Oleg
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: httpclient-user-help@jakarta.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


RE: Transmission of XML with HttpClient 3-1

Posted by Ken Richard <ke...@aeseducation.com>.
Around position 319 of the http client wire trace.  It happens on all
computers in this school, but has not been observed in any of our other
installations.  It happens on all transactions with XML data greater than
319 characters.  

I was able to patch by adding a 500 byte comment of known characters into
the HTML and fixing up the data before it is parsed.  Obviously not the best
solution.

I am pretty sure it is an environmental problem, but am not sure how to
prove that.  There are multiple security packages installed on the
workstations.

Do you know what processing takes place within java/http client before the
http client wire trace is generated?  Could this be a character encoding
mismatch or something?


-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Thursday, October 04, 2007 3:58 AM
To: HttpClient User Discussion
Subject: Re: Transmission of XML with HttpClient 3-1

On Wed, 2007-10-03 at 11:42 -0400, Ken Richard wrote:
> Hello.
> 
>  
> 
> I have been using httpclient for a long time without any issues.
Recently,
> one of our installations has a problem where the XML coming back from the
> server has a character being replaced with a \0.  We ran a WireShark trace
> and the data is correct, but the wire trace from httpclient shows the
null.
> The server for this transaction is Jetty.  We are using the latest 3.1 jar
> file.
> 
>  
> 
> Here is an excerpt from my log.  Note the /FIEL[0x0] on the last line.
> 
>  
> 
> Has anyone seen this before?  Do you have any recommendations?
> 

Ken,

Does this \0 appear randomly at different locations or at the same one?
How reproducible is this problem?  

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org


Re: Transmission of XML with HttpClient 3-1

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Wed, 2007-10-03 at 11:42 -0400, Ken Richard wrote:
> Hello.
> 
>  
> 
> I have been using httpclient for a long time without any issues.  Recently,
> one of our installations has a problem where the XML coming back from the
> server has a character being replaced with a \0.  We ran a WireShark trace
> and the data is correct, but the wire trace from httpclient shows the null.
> The server for this transaction is Jetty.  We are using the latest 3.1 jar
> file.
> 
>  
> 
> Here is an excerpt from my log.  Note the /FIEL[0x0] on the last line.
> 
>  
> 
> Has anyone seen this before?  Do you have any recommendations?
> 

Ken,

Does this \0 appear randomly at different locations or at the same one?
How reproducible is this problem?  

Oleg


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org