hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Roland Weber <ROLWE...@de.ibm.com>
Subject RE: Receiving an attachment through http
Date Thu, 13 Jan 2005 07:47:28 GMT
Hi Patrick,

> I have discovered the source of my problem.  And here it is so you know.
> 
> Our server uses servlets to generate a Crystal Report as a PDF file and
> return it as an attachment in the HTTP response.  By default HTTP Client
> requests do not specify the "User-Agent" in the header, as there really
> isn't one to specify, rather, I assume you are making your own
> User-Agent.

We are setting a default User-Agent value:
DEBUG [httpclient.wire.header] >> "User-Agent: Jakarta 
Commons-HttpClient/2.0.2[\r][\n]"

Since it's not one of the typical browser values, servlets that check only
for those will be at a loss.

> To make a long story short, Crystal Reports appears to consider an HTTP
> Request without a User-Agent to be malformed and it does not generate a
> report, it doesn't even throw an exception.  It just fails quietly.
> 
> Problem solved, thanks for your help Roland, it got me thinking to play
> with HTTP headers which after a day led me to the solution.

I'm glad I could help (by basically doing nothing ;-)

cheers,
  Roland


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message