Re: JK connector fails with long URLs

2009-01-19 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Br1,

br1 wrote:
> Ok, I am starting to understand better what is happening, there seem to be
> two problems here. 
> 
> 1 - The max URL length for IIS 5 is about 2k or so. This cannot be changed
> probably. 

That's what my knee-jerk reaction was to seeing the use of
INTERNET_MAX_URL_LENGTH in all the IIS-related sources.

> Edit: without the JK ISAPI connector, IIS returns "414 - Request - URI
> too long".

This is also what Tomcat itself will respond with if the URI is too
long. I would recommend using /this/ status code.

> Also note that, as I already wrote, in this case the JK connector breaks ALL
> requests whose URL+query string exceeds the max URL length value, not just
> the ones being AJP redirected to Tomcat. 

Interesting.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkl0qsIACgkQ9CaO5/Lv0PCi1ACgwgilLGJzjWnlntdFFJqU7ZFS
Dc8AnA/dUEfKTcZGYnP6OMdJ56Z1zpC3
=LBnJ
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-19 Thread Mladen Turk

br1 wrote:



My suggestion to the developers here, could you please intercept the error
and maybe return a "413 Request Entity Too Large" message?
This is what happens for instance with Ionics rewrite (see 31 october 2008
release,
http://www.codeplex.com/IIRF/SourceControl/ListDownloadableCommits.aspx)



This is a good suggestion.



Also note that, as I already wrote, in this case the JK connector breaks ALL
requests whose URL+query string exceeds the max URL length value, not just
the ones being AJP redirected to Tomcat. 



What we can do is make that configurable, cause there is no API
in IIS from which we could obtain that (well without going
to querying the metadatabase)

I'd suggest you file an enhancement request in bugzilla
so it doesn't get lost.

Regards
--
^(TM)

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-19 Thread br1


br1 wrote:
> 
> 
> Christopher Schultz-2 wrote:
>> 
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>> 
>> Br1,
>> 
>> br1 wrote:
>>> Do you think this limit will be increased in the next versions?
>>> 
>>> In theory, no limit is imposed by the protocol itself. I would tend to
>>> think
>>> JK should at least support what the JK supported platforms support.
>> 
>> The source code /is/ available; you could try poking around for where
>> that limit is set. There are a lot of files, but grep could help.
>> 
>> For instance, I found this (in jk 1.2.26):
>> 
>> ./common/jk_uri_worker_map.h:#define JK_MAX_URI_LEN  4095
>> 
>> ..which could suggest that the max URL length is 4k, not 2k. Maybe
>> that's not the right setting.
>> 
>> I can see this in the IIS source files:
>> 
>> ./iis/jk_isapi_plugin.c:char uri[INTERNET_MAX_URL_LENGTH];
>> 
>> INTERNET_MAX_URL_LENGTH does not seem to be defined in mod_jk's source,
>> so it probably comes from IIS itself. Is it possible that IIS is the one
>> ruining your day? I don't know of a good IIS API resource, so you might
>> have to track this one down yourself.
>> 
>> Just a thought.
>> - -chris
>> 
> 
> Hi Chris,
> 
> Thank you for your reply.
> The key factor is: with the JK connector I get the error, without the JK
> connector I don't get the error. :-)
> 
> As I said previously, it also shows up with non-JK redirected URLs, and it
> also comes out with just long query strings. 
> For instance: 
> /testalias/testpage.asp?param=[put 3000 "a"s here]
> 
> The above works without the JK connector, but it does not work with the JK
> connector. 
> I don't call it an IIS problem, I call it a JK connector problem. 
> 
> About recompiling, I am really not that good at this, and I would prefer
> not to take this responsibility.. I am quite protective with my prod
> servers. :-)
> Should this be a bug, I would prefer to wait someone that knows where to
> put his hands on the code. And avoid the need to correct and recompile
> every time a new version comes out.. 
> 
> Thank you for the hints,
> Br1.
> 

Ok, I am starting to understand better what is happening, there seem to be
two problems here. 

1 - The max URL length for IIS 5 is about 2k or so. This cannot be changed
probably. 
When trying to open a URL that exceeds this limit, the JK ISAPI connector
returns "The data area passed to a system call is too small" to the browser.

My suggestion to the developers here, could you please intercept the error
and maybe return a "413 Request Entity Too Large" message?
This is what happens for instance with Ionics rewrite (see 31 october 2008
release,
http://www.codeplex.com/IIRF/SourceControl/ListDownloadableCommits.aspx)

Edit: without the JK ISAPI connector, IIS returns "414 - Request - URI too
long". 
I suspect that the above 413 message applies to point (2) below.

2 - When opening a "short" URL that contains GET data, and the total length
of URL+parameters exceeds the max URL length, the JK ISAPI connector returns
exactly the same message: "The data area passed to a system call is too
small".

This should not happen if the URL portion does not exceed the max URL
length, and the right behaviour of the JK connector should be to either
serve the page or pass the request over to IIS.
Please note that the maximum request data on IIS 5 with URLScan installed
defaults to 4k, but can be raised (I set it at 16k).

Also note that, as I already wrote, in this case the JK connector breaks ALL
requests whose URL+query string exceeds the max URL length value, not just
the ones being AJP redirected to Tomcat. 

3 - Chris, taking a look at the code shed some light, but don't ask me to
change the code, I can hardly guess it is written in c language. :-)  

Please let me know if I should do further tests (though there is nothing
more I can think of).

Thank you,
Br1.










-- 
View this message in context: 
http://www.nabble.com/JK-connector-fails-with-long-URLs-tp21443475p21545131.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-16 Thread br1


Christopher Schultz-2 wrote:
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Br1,
> 
> br1 wrote:
>> Do you think this limit will be increased in the next versions?
>> 
>> In theory, no limit is imposed by the protocol itself. I would tend to
>> think
>> JK should at least support what the JK supported platforms support.
> 
> The source code /is/ available; you could try poking around for where
> that limit is set. There are a lot of files, but grep could help.
> 
> For instance, I found this (in jk 1.2.26):
> 
> ./common/jk_uri_worker_map.h:#define JK_MAX_URI_LEN  4095
> 
> ..which could suggest that the max URL length is 4k, not 2k. Maybe
> that's not the right setting.
> 
> I can see this in the IIS source files:
> 
> ./iis/jk_isapi_plugin.c:char uri[INTERNET_MAX_URL_LENGTH];
> 
> INTERNET_MAX_URL_LENGTH does not seem to be defined in mod_jk's source,
> so it probably comes from IIS itself. Is it possible that IIS is the one
> ruining your day? I don't know of a good IIS API resource, so you might
> have to track this one down yourself.
> 
> Just a thought.
> - -chris
> 

Hi Chris,

Thank you for your reply.
The key factor is: with the JK connector I get the error, without the JK
connector I don't get the error. :-)

As I said previously, it also shows up with non-JK redirected URLs, and it
also comes out with just long query strings. 
For instance: 
/testalias/testpage.asp?param=[put 3000 "a"s here]

The above works without the JK connector, but it does not work with the JK
connector. 
I don't call it an IIS problem, I call it a JK connector problem. 

About recompiling, I am really not that good at this, and I would prefer not
to take this responsibility.. I am quite protective with my prod servers.
:-)
Should this be a bug, I would prefer to wait someone that knows where to put
his hands on the code. And avoid the need to correct and recompile every
time a new version comes out.. 

Thank you for the hints,
Br1.
-- 
View this message in context: 
http://www.nabble.com/JK-connector-fails-with-long-URLs-tp21443475p21511740.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-16 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Br1,

br1 wrote:
> Do you think this limit will be increased in the next versions?
> 
> In theory, no limit is imposed by the protocol itself. I would tend to think
> JK should at least support what the JK supported platforms support.

The source code /is/ available; you could try poking around for where
that limit is set. There are a lot of files, but grep could help.

For instance, I found this (in jk 1.2.26):

./common/jk_uri_worker_map.h:#define JK_MAX_URI_LEN  4095

..which could suggest that the max URL length is 4k, not 2k. Maybe
that's not the right setting.

I can see this in the IIS source files:

./iis/jk_isapi_plugin.c:char uri[INTERNET_MAX_URL_LENGTH];

INTERNET_MAX_URL_LENGTH does not seem to be defined in mod_jk's source,
so it probably comes from IIS itself. Is it possible that IIS is the one
ruining your day? I don't know of a good IIS API resource, so you might
have to track this one down yourself.

Just a thought.
- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAklwtM4ACgkQ9CaO5/Lv0PCBeQCfYaiXgWD3DFyPg5sey4gXGlqH
CxcAnijSP/NX/+bbNxWh3ilJWA2381Sv
=nvXT
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-16 Thread br1

Hi,

Thank you.. if this was this easy.. :-)
Unfortunately, one of their requirements is to send the URLs by email. 

I already told them to use a different method, but I still hope to see an
higher limit in the next JK version.

Thanks again,
Br1.


awarnier wrote:
> 
> br1 wrote:
>> 
>> Rainer Jung-3 wrote:
>>> It looks like we only support URLs up to 2047 Bytes (+/- 1).
>>>
>>> Regards,
>>>
>>> Rainer
>>>
>> 
>> Hey Rainer,
>> 
>> Do you think this limit will be increased in the next versions?
>> 
>> In theory, no limit is imposed by the protocol itself. I would tend to
>> think
>> JK should at least support what the JK supported platforms support.
>> 
>> What is annoying - at least on IIS - is that all requests get blocked,
>> not
>> just the ones getting redirected to Tomcat. This limit is not present on
>> any
>> other ISAPI filter I know.  
>> 
>> Don't get me wrong: my personal opinion is that 2k are more than enough
>> for
>> any URL, but the only place I can impose this limit is at home. And maybe
>> not for much longer. :-) 
>> 
> 
> 
> has the browser send request parameters in the body of the request, 
> instead of the URL. No 2K limit there.
> 
> 
> -
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JK-connector-fails-with-long-URLs-tp21443475p21496454.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-15 Thread André Warnier

br1 wrote:


Rainer Jung-3 wrote:

It looks like we only support URLs up to 2047 Bytes (+/- 1).

Regards,

Rainer



Hey Rainer,

Do you think this limit will be increased in the next versions?

In theory, no limit is imposed by the protocol itself. I would tend to think
JK should at least support what the JK supported platforms support.

What is annoying - at least on IIS - is that all requests get blocked, not
just the ones getting redirected to Tomcat. This limit is not present on any
other ISAPI filter I know.  


Don't get me wrong: my personal opinion is that 2k are more than enough for
any URL, but the only place I can impose this limit is at home. And maybe
not for much longer. :-) 




has the browser send request parameters in the body of the request, 
instead of the URL. No 2K limit there.



-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-15 Thread br1


Rainer Jung-3 wrote:
> 
> It looks like we only support URLs up to 2047 Bytes (+/- 1).
> 
> Regards,
> 
> Rainer
> 

Hey Rainer,

Do you think this limit will be increased in the next versions?

In theory, no limit is imposed by the protocol itself. I would tend to think
JK should at least support what the JK supported platforms support.

What is annoying - at least on IIS - is that all requests get blocked, not
just the ones getting redirected to Tomcat. This limit is not present on any
other ISAPI filter I know.  

Don't get me wrong: my personal opinion is that 2k are more than enough for
any URL, but the only place I can impose this limit is at home. And maybe
not for much longer. :-) 

Thank you,
Br1.

-- 
View this message in context: 
http://www.nabble.com/JK-connector-fails-with-long-URLs-tp21443475p21489226.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-15 Thread Rainer Jung

On 15.01.2009 14:53, br1 wrote:

Additional info:
- Machines are IIS 5 on Windows 2000 Server
- Though the same happens on my XP laptop
- The JK log shows this error message, with the line number varying between
JK versions, here is the 1.2.27 one:
[error] jk_isapi_plugin.c (1852): error while getting the url

Is this a known bug?

Note: on Windows, IE 6 and 7 do not seem to support URLs with more than 2048
characters. The problem shows on Firefox and Chrome only, where this limit
is not present. For the records, Opera just does not open such a long
address.

Thank you,
Br1.


It looks like we only support URLs up to 2047 Bytes (+/- 1).

Regards,

Rainer

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



Re: JK connector fails with long URLs

2009-01-15 Thread br1

Additional info:
- Machines are IIS 5 on Windows 2000 Server
- Though the same happens on my XP laptop
- The JK log shows this error message, with the line number varying between
JK versions, here is the 1.2.27 one:
[error] jk_isapi_plugin.c (1852): error while getting the url

Is this a known bug? 

Note: on Windows, IE 6 and 7 do not seem to support URLs with more than 2048
characters. The problem shows on Firefox and Chrome only, where this limit
is not present. For the records, Opera just does not open such a long
address. 

Thank you,
Br1.


br1 wrote:
> 
> Hi,
> 
> I am experiencing a problem with the JK connector. 
> 
> I have a customer that uses insanely long URLs for his Tomcat application. 
> Here is the configuration:
> IIS 5
> JK 1.2.26 (also tested with 1.2.27 and 1.2.14)
> 
> By opening one of these URLs, if more than 2102 bytes long, the browser
> shows this error message:
> The data area passed to a system call is too small. 
> 
> To cut it short, I found out that:
> - the same error message appears on every URL typed into the browser that
> exceeds a certain length, even with other extensions, like .asp, even for
> non existing files
> - the problem does not appear when I remove the JK ISAPI filter.
> 
> What should I do?
> 
> Thank you in advance,
> Br1
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/JK-connector-fails-with-long-URLs-tp21443475p21478016.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org