Yaxiong,

It is not wise to emit a header longer than 512 bytes, because many server
implementations will choke.  At one time, I believe in HTTP 1.0, the max was
255, and there are still many servers that will use that limit.  Unless you can
guarantee that the receiving server will always be of your choosing changing
Apache XML-RPC won't fix your problem.

The reason for the limit was that some server implementations pass headers to
cgi scripts as command line arguments, and some OSs, NT included, have a low
limit on the length of command lines.  This is probably why you saw different
results on different OSs.

- Lucas


"Lin, Yaxiong" wrote:
> 
> Hannes:
> 
> I am not technical enough in this area to make a suggestion on the header
> length limit.  I will leave this to those who are more technically talented
> people than me to contribute.
> 
> Thanks.
> 
> - Yaxiong
> 
> > -----Original Message-----
> > From: Hannes Wallnöfer [SMTP:[EMAIL PROTECTED]]
> > Sent: Wednesday, March 06, 2002 5:57 AM
> > To:   [EMAIL PROTECTED]
> > Cc:   [EMAIL PROTECTED]
> > Subject:      Re: HTTP Header too long error, PLEASE HELP!
> >
> > Obviously the 512 byte limit is to short.
> >
> > Any idea what a good assumption would be for the maximum size of a
> > single HTTP header?
> > 1k? 2k?
> >
> > Hannes
> >
> > Lin, Yaxiong wrote:
> >
> > >I am getting the "HTTP Header too long" error on the WebServer (running
> > on
> > >NT) when processing request from the client runing on zOS.  The same
> > client
> > >java app running on NT does not cause this error on the same WebServer.
> > >
> > >I looked at the source code (WebServer.java), the IOException (HTTP
> > Header
> > >too long) is thrown when the buffer size is > 512.
> > >
> > >My question is: why the same java client code causes the buffer overflow
> > on
> > >the same WebServer (on NT) when run on the zOS (IBM) but not when run on
> > NT?
> > >And how do I get around this problem?
> > >
> > >
> > >Thanks in advance for the help.
> > >
> > >- Yaxiong Lin
> > >  Mayo Clinic
> > >  Rochester, MN 55905
> > >
> >
> >

Reply via email to