You are viewing a plain text version of this content. The canonical link for it is here.
Posted to rpc-user@xml.apache.org by "Lin, Yaxiong" <li...@mayo.edu> on 2002/03/05 17:40:24 UTC

HTTP Header too long error, PLEASE HELP!

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

Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnoefer <ha...@helma.at>.
Oh my, of course: we're not even doing anything useful with those headers!

Thanks John.

Hannes

John Wilson wrote:

>Hannes,
>
>    I have a small buffer for the header and just throw away any bytes that
>don't fit in. The only headers I'm interested in for XML-RPC are not going
>to be long so I don't care about the very long ones.
>
>This seems to me to be a slightly more robust approach.
>
>John Wilson
>The Wilson Partnership
>http://www.wilson.co.uk
>----- Original Message -----
>From: "Hannes Wallnöfer" <ha...@helma.at>
>To: <rp...@xml.apache.org>
>Sent: Wednesday, March 06, 2002 3:56 PM
>Subject: Re: HTTP Header too long error, PLEASE HELP!
>
>
>>I just increased the buffer size from 512 to 2048 bytes. If you use the
>>latest version from the CVS, you shouldn't see this error again (unless
>>your client sends some abnormally large HTTP header).
>>
>
>





Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnoefer <ha...@helma.at>.
Oh my, of course: we're not even doing anything useful with those headers!

Thanks John.

Hannes

John Wilson wrote:

>Hannes,
>
>    I have a small buffer for the header and just throw away any bytes that
>don't fit in. The only headers I'm interested in for XML-RPC are not going
>to be long so I don't care about the very long ones.
>
>This seems to me to be a slightly more robust approach.
>
>John Wilson
>The Wilson Partnership
>http://www.wilson.co.uk
>----- Original Message -----
>From: "Hannes Wallnöfer" <ha...@helma.at>
>To: <rp...@xml.apache.org>
>Sent: Wednesday, March 06, 2002 3:56 PM
>Subject: Re: HTTP Header too long error, PLEASE HELP!
>
>
>>I just increased the buffer size from 512 to 2048 bytes. If you use the
>>latest version from the CVS, you shouldn't see this error again (unless
>>your client sends some abnormally large HTTP header).
>>
>
>





Re: HTTP Header too long error, PLEASE HELP!

Posted by John Wilson <tu...@wilson.co.uk>.
Hannes,

    I have a small buffer for the header and just throw away any bytes that
don't fit in. The only headers I'm interested in for XML-RPC are not going
to be long so I don't care about the very long ones.

This seems to me to be a slightly more robust approach.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Hannes Wallnöfer" <ha...@helma.at>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 06, 2002 3:56 PM
Subject: Re: HTTP Header too long error, PLEASE HELP!


> I just increased the buffer size from 512 to 2048 bytes. If you use the
> latest version from the CVS, you shouldn't see this error again (unless
> your client sends some abnormally large HTTP header).




Re: HTTP Header too long error, PLEASE HELP!

Posted by John Wilson <tu...@wilson.co.uk>.
Hannes,

    I have a small buffer for the header and just throw away any bytes that
don't fit in. The only headers I'm interested in for XML-RPC are not going
to be long so I don't care about the very long ones.

This seems to me to be a slightly more robust approach.

John Wilson
The Wilson Partnership
http://www.wilson.co.uk
----- Original Message -----
From: "Hannes Wallnöfer" <ha...@helma.at>
To: <rp...@xml.apache.org>
Sent: Wednesday, March 06, 2002 3:56 PM
Subject: Re: HTTP Header too long error, PLEASE HELP!


> I just increased the buffer size from 512 to 2048 bytes. If you use the
> latest version from the CVS, you shouldn't see this error again (unless
> your client sends some abnormally large HTTP header).




Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
I just increased the buffer size from 512 to 2048 bytes. If you use the 
latest version from the CVS, you shouldn't see this error again (unless 
your client sends some abnormally large HTTP header).

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
>




Re: HTTP Header too long error, PLEASE HELP!

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/6/02 3:56 AM, "Hannes Wallnöfer" <ha...@helma.at> wrote:

> Any idea what a good assumption would be for the maximum size of a
> single HTTP header?
> 1k? 2k?
> 
> Hannes

Look at what Apache httpd does...or even Tomcat's httpd.

-jon


Re: HTTP Header too long error, PLEASE HELP!

Posted by Jon Scott Stevens <jo...@latchkey.com>.
on 3/6/02 3:56 AM, "Hannes Wallnöfer" <ha...@helma.at> wrote:

> Any idea what a good assumption would be for the maximum size of a
> single HTTP header?
> 1k? 2k?
> 
> Hannes

Look at what Apache httpd does...or even Tomcat's httpd.

-jon


Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
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
>




Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
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
>




Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
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
>




Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
I just increased the buffer size from 512 to 2048 bytes. If you use the 
latest version from the CVS, you shouldn't see this error again (unless 
your client sends some abnormally large HTTP header).

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
>




Re: HTTP Header too long error, PLEASE HELP!

Posted by Hannes Wallnöfer <ha...@helma.at>.
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
>