Possible Bug With Response Headers?

Discussion about how to code things with Jaxer.

Moderator: Aptana Staff

Possible Bug With Response Headers?

Postby nlsmith » Tue Nov 11, 2008 3:39 am

I'm using Jaxer 1.0.0.4147 on Ubuntu server 8.04 with Apache 2.2.8 and am running into a strange problem. This code:

Code: Select all
<script runat="server">
Jaxer.response.setClientFramework(null);
Jaxer.response.headers["Content-Type"] = "text/html";
var h = Jaxer.response.headers;
var s = [];
s.length = 3926;
h['X-TEST-1'] = s;
</script>


runs fine. It just sets a header to a string of 3,925 commas. However, if you add:

Code: Select all
h['X-TEST-2'] = s;


A second time, just before the closing script tag, I get a 500 from Apache, and this in my server error log:

Code: Select all
[Mon Nov 10 21:08:43 2008] [warn] mod_jaxer: invalid data type (\x02) received, while expecting a body (4)
[Mon Nov 10 21:08:43 2008] [warn] [client 71.213.224.23] (500)Unknown error 500: mod_jaxer: parse response body failed


If I change 3926 to 3925, both headers get sent.

If I repeat this process for smaller lengths with more headers, I get the same error everytime it's around 7500-8000 total characters. Is there a limit to the total header length sent by Apache or Jaxer? I couldn't find anything by googling.

I found this while working on this: http://forums.aptana.com/viewtopic.php?p=26057

I have not had a chance to try and reproduce this error on Mac or Windows, so I'm not sure if it's related to my platform or can happen anywhere. I was unable to submit an ASAP ticket.

Does anyone have any idea why this might be happening?

Thanks,

Nathan
User avatar
nlsmith
 
Posts: 82
Joined: Wed Jan 23, 2008 2:57 am
Location: Iowa City, IA

Postby davey » Tue Nov 11, 2008 6:13 pm

Nathan,

i'll have a look at this today and get back to you. It has the smell of an arbitrary limit, we've ran into a few of those with mozilla, they can be tought to debug. But first i'll see if I can repro on windows to eliminate it is a platform specific thing.

cheers
User avatar
davey
 
Posts: 710
Joined: Mon Jul 23, 2007 9:25 pm


Return to Jaxer Coding Q & A