Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
I think this one case can be handled this way because you could truncate the 
request (some content may have been read ahead) and then flag it for special 
handling in the normal connection processing code/threads.  The reason is the 
server has a full request, you're just choosing to not read all the content, so 
if you do a little touch up of the conn structure it can flow through the 
connection threads without tripping up.  I'm cautious here because I've spent a 
lot of time in the past debugging half-baked conn problems.  So, this patch 
makes sense for the E_CRANGE error alone, the most annoying problem.

Later we could kick around the idea of getting the code in the driver to handle 
much more detailed logging, dumping the access log module, etc.  

-Jim


On Jun 23, 2011, at 11:14 AM, Dossy Shiobara wrote:

> That was what I was thinking -- driver marks the request as exceeding the 
> limit, and setting the response status code to 413.  The benefits that I see 
> (if implemented the way I'm imagining) --
> 
> 1) access logging of requests w/ 413 status code
> 
> 2) custom response page via ns/server/${server}/redirects.
> 
> If you and Brian could work up a patch, that'd be wonderful!
> 
> Does anyone see any problems with this approach?  Any reason not to do it?  I 
> don't suppose it can possibly break any kind of backward compatibility, as no 
> code right now can even be written to handle such a scenario, anyway.
> 
> Of course, once we decide on a behavior, and folks code against the 
> implementation ... changing/fixing it becomes more "expensive" for everyone, 
> so if there's any kind of worry about how this is going to work, lets iron 
> out the details now ;)
> 
> 
> On 6/23/11 12:29 PM, Enrique Catalan wrote:
>> IMHO, I agree with Dossy, to use the driver thread to check the hard
>> limits and instead of dropping the connection, just mark the HTTP
>> request and let the request handler to return the 413. I also think
>> the template could be configured in the 'ns_section
>> ns/server/${server}/redirects' ,  isn't it ?
>> 
>> If you all agree with this, Brian and I can help to get a patch.
> 
> -- 
> Dossy Shiobara |  "He realized the fastest way to change
> do...@panoptic.com |   is to laugh at your own folly -- then you
> http://panoptic.com/   |   can let go and quickly move on." (p. 70)
>  * WordPress * jQuery * MySQL * Security * Business Continuity *
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Dossy Shiobara
That was what I was thinking -- driver marks the request as exceeding 
the limit, and setting the response status code to 413.  The benefits 
that I see (if implemented the way I'm imagining) --


1) access logging of requests w/ 413 status code

2) custom response page via ns/server/${server}/redirects.

If you and Brian could work up a patch, that'd be wonderful!

Does anyone see any problems with this approach?  Any reason not to do 
it?  I don't suppose it can possibly break any kind of backward 
compatibility, as no code right now can even be written to handle such a 
scenario, anyway.


Of course, once we decide on a behavior, and folks code against the 
implementation ... changing/fixing it becomes more "expensive" for 
everyone, so if there's any kind of worry about how this is going to 
work, lets iron out the details now ;)



On 6/23/11 12:29 PM, Enrique Catalan wrote:

IMHO, I agree with Dossy, to use the driver thread to check the hard
limits and instead of dropping the connection, just mark the HTTP
request and let the request handler to return the 413. I also think
the template could be configured in the 'ns_section
ns/server/${server}/redirects' ,  isn't it ?

If you all agree with this, Brian and I can help to get a patch.


--
Dossy Shiobara |  "He realized the fastest way to change
do...@panoptic.com |   is to laugh at your own folly -- then you
http://panoptic.com/   |   can let go and quickly move on." (p. 70)
  * WordPress * jQuery * MySQL * Security * Business Continuity *


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Dossy Shiobara
In theory, it could go on SourceForge's issue tracker ... or opened as a 
issue on GitHub ... or ...



On 6/23/11 12:13 PM, Jim Davidson wrote:

Agreed. Should go on the bug/feature list. Is there a list ?  :)

Sent from a phone

On Jun 23, 2011, at 9:58 AM, Dossy Shiobara  wrote:


>  Yes, on E_CRANGE, the driver thread should return HTTP 413 Request too 
large, IMHO.  And, we should be able to configure a custom response for status 
code 413 ...
>  
>  Patches welcome ;)


--
Dossy Shiobara |  "He realized the fastest way to change
do...@panoptic.com |   is to laugh at your own folly -- then you
http://panoptic.com/   |   can let go and quickly move on." (p. 70)
  * WordPress * jQuery * MySQL * Security * Business Continuity *


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Enrique Catalan
Hi,

The final goal is to have a server-side validation and return a page
template explaining what the problem is rather than just closing the
connection.  Having client-side validation ( JavaScript/Flash like
gmail )  helps in terms of UI but I presume wouldn't be safe enough
agains DoS.

IMHO, I agree with Dossy, to use the driver thread to check the hard
limits and instead of dropping the connection, just mark the HTTP
request and let the request handler to return the 413. I also think
the template could be configured in the 'ns_section
ns/server/${server}/redirects' ,  isn't it ?

If you all agree with this, Brian and I can help to get a patch.

Thanks for the great feedback!,
Enrique.


On Thu, Jun 23, 2011 at 4:28 PM, Fenton, Brian  wrote:
> I'm using OpenACS hence the TCL. I just want to let the user know that their 
> file is over the size limit. Could we, in driver.c instead of closing the 
> connection socket, return a custom template (like Apache does) ?
>
> Brian
>
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 15:59
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>
> I think the short answer is there is no way.
>
> Checking the code and your error message, this is error condition E_CRANGE.  
> It's returned from SockReadLine which is called repeatedly to read the 
> request line ("GET /url/ ...") and headers.  As it reads lines, it parses 
> them for some special conditions.  If it sees a "content-length" header, it's 
> parsed and verified the content to be sent isn't out of range.  If it is, it 
> returns E_CRANGE and the connection is aborted.  So, there's no Tcl 
> environment available to fiddle with.
>
> There is some Tcl framework in there for "que wait" callbacks but it's not 
> exposed for error conditions.  Good idea.
>
> Question:  What are you trying to do with Tcl?  Maybe you could hack the 
> driver.c code to do something smart at CRANGE alone?  I think it's the most 
> common limit-related error.
>
> -Jim
>
>
> On Jun 23, 2011, at 8:22 AM, Fenton, Brian wrote:
>
>> Thanks Jim
>>
>> yes that now logs the fact that the file was too big (multiple times in 
>> fact), but how can I access this fact in TCL?
>>
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[38]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[39]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[40]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[41]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[42]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[43]: max 
>> content exceeded
>> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[44]: max 
>> content exceeded
>>
>> Brian
>>
>> 
>> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
>> Davidson [jgdavid...@mac.com]
>> Sent: 23 June 2011 14:44
>> To: AOLSERVER@LISTSERV.AOL.COM
>> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>>
>> Howdy,
>>
>> Appears you need to set driver "debug" mode for the driver for the given 
>> socket module thing:
>>
>> ns_section "ns/server/server1/module/nssock"
>> ns_param debug 1
>>
>> Hopefully that's not too much muck in the server log.
>>
>> -Jim
>>
>>
>> On Jun 23, 2011, at 7:16 AM, Fenton, Brian wrote:
>>
>>> Thanks Jim
>>>
>>> I should have mentioned that there was nothing in the error log either.
>>>
>>> So, how would you recommend I capture the fact that the uploaded file is 
>>> larger than our limit, and feedback to the user?
>>>
>>>
>>> thanks
>>> Brian
>>>
>>>
>>> 
>>> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
>>> Davidson [jgdavid...@mac.com]
>>> Sent: 23 June 2011 13:47
>>> To: AOLSERVER@LISTSERV.AOL.COM
>>> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>>>
>>> Hi,
>>>
>>> The short answer is no, there's no access log entry although there may be a 
>>> server log message buried in the chatter.
>>>
>>> The reason is the access log is a "trace" that fires at the end of an HTTP 
>>> connection and the request isn't a connection until all the content has 
>>> been read and the data structures hooked up and passed over to a connection 
>>> thread.  In retrospect, transaction logging should be a lower-level 
>>> built-in that can deal with logging these aborted transactions.
>>>
>>> You can see what may be logged in the server log by looking at the 
>>> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max 
>>> request exceeded".
>>>
>>>
>>> -Jim
>>>
>>>
>>>
>>>
>>> On Jun 23, 2011, at 6

Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
Agreed. Should go on the bug/feature list. Is there a list ?  :)

Sent from a phone

On Jun 23, 2011, at 9:58 AM, Dossy Shiobara  wrote:

> Yes, on E_CRANGE, the driver thread should return HTTP 413 Request too large, 
> IMHO.  And, we should be able to configure a custom response for status code 
> 413 ...
> 
> Patches welcome ;)
> 
> 
> On 6/23/11 11:28 AM, Fenton, Brian wrote:
>> I'm using OpenACS hence the TCL. I just want to let the user know that their 
>> file is over the size limit. Could we, in driver.c instead of closing the 
>> connection socket, return a custom template (like Apache does) ?
> 
> -- 
> Dossy Shiobara |  "He realized the fastest way to change
> do...@panoptic.com |   is to laugh at your own folly -- then you
> http://panoptic.com/   |   can let go and quickly move on." (p. 70)
>  * WordPress * jQuery * MySQL * Security * Business Continuity *
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Dossy Shiobara
Yes, on E_CRANGE, the driver thread should return HTTP 413 Request too 
large, IMHO.  And, we should be able to configure a custom response for 
status code 413 ...


Patches welcome ;)


On 6/23/11 11:28 AM, Fenton, Brian wrote:

I'm using OpenACS hence the TCL. I just want to let the user know that their 
file is over the size limit. Could we, in driver.c instead of closing the 
connection socket, return a custom template (like Apache does) ?


--
Dossy Shiobara |  "He realized the fastest way to change
do...@panoptic.com |   is to laugh at your own folly -- then you
http://panoptic.com/   |   can let go and quickly move on." (p. 70)
  * WordPress * jQuery * MySQL * Security * Business Continuity *


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Fenton, Brian
I'm using OpenACS hence the TCL. I just want to let the user know that their 
file is over the size limit. Could we, in driver.c instead of closing the 
connection socket, return a custom template (like Apache does) ?

Brian


From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
Davidson [jgdavid...@mac.com]
Sent: 23 June 2011 15:59
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput

I think the short answer is there is no way.

Checking the code and your error message, this is error condition E_CRANGE.  
It's returned from SockReadLine which is called repeatedly to read the request 
line ("GET /url/ ...") and headers.  As it reads lines, it parses them for some 
special conditions.  If it sees a "content-length" header, it's parsed and 
verified the content to be sent isn't out of range.  If it is, it returns 
E_CRANGE and the connection is aborted.  So, there's no Tcl environment 
available to fiddle with.

There is some Tcl framework in there for "que wait" callbacks but it's not 
exposed for error conditions.  Good idea.

Question:  What are you trying to do with Tcl?  Maybe you could hack the 
driver.c code to do something smart at CRANGE alone?  I think it's the most 
common limit-related error.

-Jim


On Jun 23, 2011, at 8:22 AM, Fenton, Brian wrote:

> Thanks Jim
>
> yes that now logs the fact that the file was too big (multiple times in 
> fact), but how can I access this fact in TCL?
>
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[38]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[39]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[40]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[41]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[42]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[43]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[44]: max 
> content exceeded
>
> Brian
>
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 14:44
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>
> Howdy,
>
> Appears you need to set driver "debug" mode for the driver for the given 
> socket module thing:
>
> ns_section "ns/server/server1/module/nssock"
> ns_param debug 1
>
> Hopefully that's not too much muck in the server log.
>
> -Jim
>
>
> On Jun 23, 2011, at 7:16 AM, Fenton, Brian wrote:
>
>> Thanks Jim
>>
>> I should have mentioned that there was nothing in the error log either.
>>
>> So, how would you recommend I capture the fact that the uploaded file is 
>> larger than our limit, and feedback to the user?
>>
>>
>> thanks
>> Brian
>>
>>
>> 
>> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
>> Davidson [jgdavid...@mac.com]
>> Sent: 23 June 2011 13:47
>> To: AOLSERVER@LISTSERV.AOL.COM
>> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>>
>> Hi,
>>
>> The short answer is no, there's no access log entry although there may be a 
>> server log message buried in the chatter.
>>
>> The reason is the access log is a "trace" that fires at the end of an HTTP 
>> connection and the request isn't a connection until all the content has been 
>> read and the data structures hooked up and passed over to a connection 
>> thread.  In retrospect, transaction logging should be a lower-level built-in 
>> that can deal with logging these aborted transactions.
>>
>> You can see what may be logged in the server log by looking at the 
>> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max 
>> request exceeded".
>>
>>
>> -Jim
>>
>>
>>
>>
>> On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:
>>
>>> Hi
>>>
>>> When I upload a file larger than the maxinput I get the Firefox browser 
>>> page with a "the connection to the server was reset while the page was 
>>> loading" message. Looking in the access logs it seems to suggest that it 
>>> doesn't even hit the website as there is no log entry. A file smaller than 
>>> the maxinput uploads with no problems and everything is correctly logged. 
>>> Increasing maxinput allows the file to upload and also is everything is 
>>> correctly logged (so it's not a browser or network issue).
>>>
>>> I don't fully understand this - if there is no entry in the access log, 
>>> does this mean that I'm not even connnecting to AOLserver? As the success 
>>> of the upload is dependent on maxinput I imagine there is some sort of 
>>> connection to the server. Assuming there is a connection how can I log it 
>>> or interc

Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
I think the short answer is there is no way.

Checking the code and your error message, this is error condition E_CRANGE.  
It's returned from SockReadLine which is called repeatedly to read the request 
line ("GET /url/ ...") and headers.  As it reads lines, it parses them for some 
special conditions.  If it sees a "content-length" header, it's parsed and 
verified the content to be sent isn't out of range.  If it is, it returns 
E_CRANGE and the connection is aborted.  So, there's no Tcl environment 
available to fiddle with.

There is some Tcl framework in there for "que wait" callbacks but it's not 
exposed for error conditions.  Good idea.

Question:  What are you trying to do with Tcl?  Maybe you could hack the 
driver.c code to do something smart at CRANGE alone?  I think it's the most 
common limit-related error.

-Jim


On Jun 23, 2011, at 8:22 AM, Fenton, Brian wrote:

> Thanks Jim
> 
> yes that now logs the fact that the file was too big (multiple times in 
> fact), but how can I access this fact in TCL?
> 
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[38]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[39]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[40]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[41]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[42]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[43]: max 
> content exceeded
> [23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[44]: max 
> content exceeded
> 
> Brian
> 
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 14:44
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
> 
> Howdy,
> 
> Appears you need to set driver "debug" mode for the driver for the given 
> socket module thing:
> 
> ns_section "ns/server/server1/module/nssock"
> ns_param debug 1
> 
> Hopefully that's not too much muck in the server log.
> 
> -Jim
> 
> 
> On Jun 23, 2011, at 7:16 AM, Fenton, Brian wrote:
> 
>> Thanks Jim
>> 
>> I should have mentioned that there was nothing in the error log either.
>> 
>> So, how would you recommend I capture the fact that the uploaded file is 
>> larger than our limit, and feedback to the user?
>> 
>> 
>> thanks
>> Brian
>> 
>> 
>> 
>> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
>> Davidson [jgdavid...@mac.com]
>> Sent: 23 June 2011 13:47
>> To: AOLSERVER@LISTSERV.AOL.COM
>> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>> 
>> Hi,
>> 
>> The short answer is no, there's no access log entry although there may be a 
>> server log message buried in the chatter.
>> 
>> The reason is the access log is a "trace" that fires at the end of an HTTP 
>> connection and the request isn't a connection until all the content has been 
>> read and the data structures hooked up and passed over to a connection 
>> thread.  In retrospect, transaction logging should be a lower-level built-in 
>> that can deal with logging these aborted transactions.
>> 
>> You can see what may be logged in the server log by looking at the 
>> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max 
>> request exceeded".
>> 
>> 
>> -Jim
>> 
>> 
>> 
>> 
>> On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:
>> 
>>> Hi
>>> 
>>> When I upload a file larger than the maxinput I get the Firefox browser 
>>> page with a "the connection to the server was reset while the page was 
>>> loading" message. Looking in the access logs it seems to suggest that it 
>>> doesn't even hit the website as there is no log entry. A file smaller than 
>>> the maxinput uploads with no problems and everything is correctly logged. 
>>> Increasing maxinput allows the file to upload and also is everything is 
>>> correctly logged (so it's not a browser or network issue).
>>> 
>>> I don't fully understand this - if there is no entry in the access log, 
>>> does this mean that I'm not even connnecting to AOLserver? As the success 
>>> of the upload is dependent on maxinput I imagine there is some sort of 
>>> connection to the server. Assuming there is a connection how can I log it 
>>> or intercept it?
>>> 
>>> Can anyone advise me on what to try? Ideally, I'd like to be able to 
>>> capture the fact that the uploaded file is larger than our limit, and 
>>> feedback to the user. Even more ideally, I'd like to be able to tell them 
>>> BEFORE they upload. :-)
>>> 
>>> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 
>>> but also happens on 4.0.10 and on Windows version)
>>> 
>>> set max_file_upload_mb10
>>> set max_file_up

Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Fenton, Brian
Thanks Jim

yes that now logs the fact that the file was too big (multiple times in fact), 
but how can I access this fact in TCL?

[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[38]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[39]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[40]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[41]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[42]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[43]: max 
content exceeded
[23/Jun/2011:15:05:50][27869.163851][-nssock:driver-] Error: conn[44]: max 
content exceeded

Brian


From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
Davidson [jgdavid...@mac.com]
Sent: 23 June 2011 14:44
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput

Howdy,

Appears you need to set driver "debug" mode for the driver for the given socket 
module thing:

ns_section "ns/server/server1/module/nssock"
ns_param debug 1

Hopefully that's not too much muck in the server log.

-Jim


On Jun 23, 2011, at 7:16 AM, Fenton, Brian wrote:

> Thanks Jim
>
> I should have mentioned that there was nothing in the error log either.
>
> So, how would you recommend I capture the fact that the uploaded file is 
> larger than our limit, and feedback to the user?
>
>
> thanks
> Brian
>
>
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 13:47
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>
> Hi,
>
> The short answer is no, there's no access log entry although there may be a 
> server log message buried in the chatter.
>
> The reason is the access log is a "trace" that fires at the end of an HTTP 
> connection and the request isn't a connection until all the content has been 
> read and the data structures hooked up and passed over to a connection 
> thread.  In retrospect, transaction logging should be a lower-level built-in 
> that can deal with logging these aborted transactions.
>
> You can see what may be logged in the server log by looking at the 
> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max 
> request exceeded".
>
>
> -Jim
>
>
>
>
> On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:
>
>> Hi
>>
>> When I upload a file larger than the maxinput I get the Firefox browser page 
>> with a "the connection to the server was reset while the page was loading" 
>> message. Looking in the access logs it seems to suggest that it doesn't even 
>> hit the website as there is no log entry. A file smaller than the maxinput 
>> uploads with no problems and everything is correctly logged. Increasing 
>> maxinput allows the file to upload and also is everything is correctly 
>> logged (so it's not a browser or network issue).
>>
>> I don't fully understand this - if there is no entry in the access log, does 
>> this mean that I'm not even connnecting to AOLserver? As the success of the 
>> upload is dependent on maxinput I imagine there is some sort of connection 
>> to the server. Assuming there is a connection how can I log it or intercept 
>> it?
>>
>> Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
>> the fact that the uploaded file is larger than our limit, and feedback to 
>> the user. Even more ideally, I'd like to be able to tell them BEFORE they 
>> upload. :-)
>>
>> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 
>> but also happens on 4.0.10 and on Windows version)
>>
>> set max_file_upload_mb10
>> set max_file_upload_min5
>> ns_section ns/server/${server}/module/nssock
>>   ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] 
>> ;# Maximum File Size for uploads in bytes
>>   ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] 
>> ;# Maximum File Size for uploads in bytes
>>   ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# 
>> Maximum request time in minutes
>>
>>
>> --
>> AOLserver - http://www.aolserver.com/
>>
>> To Remove yourself from this list, simply send an email to 
>>  with the
>> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
>> field of your email blank.
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email mes

Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Fenton, Brian
Thanks Majid

well there are Flash based on front end solutions e.g. SWFUpload, but it's not 
possible in Javascript. I think it's still important to have a server solution 
as well. I do agree though that it's kind of crazy to find out AFTER you upload 
a file, that the file was too big!

Brian


From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Majid Khan 
[majidkha...@gmail.com]
Sent: 23 June 2011 14:34
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput

I think if its possible in your case use the javascript and calculate the size 
of the upload file and return it right away if its  exceeds the limit this way 
you dont' need to worry about sending the request to the server, waiting for a 
while and ended up with nothing returned.

Regards,

Majid.

On Thu, Jun 23, 2011 at 5:16 PM, Fenton, Brian 
mailto:brian.fen...@quest.ie>> wrote:
Thanks Jim

I should have mentioned that there was nothing in the error log either.

So, how would you recommend I capture the fact that the uploaded file is larger 
than our limit, and feedback to the user?


thanks
Brian



From: AOLserver Discussion 
[AOLSERVER@LISTSERV.AOL.COM] On Behalf Of 
Jim Davidson [jgdavid...@mac.com]
Sent: 23 June 2011 13:47
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput

Hi,

The short answer is no, there's no access log entry although there may be a 
server log message buried in the chatter.

The reason is the access log is a "trace" that fires at the end of an HTTP 
connection and the request isn't a connection until all the content has been 
read and the data structures hooked up and passed over to a connection thread.  
In retrospect, transaction logging should be a lower-level built-in that can 
deal with logging these aborted transactions.

You can see what may be logged in the server log by looking at the LogReadError 
function at the end of nsd/driver.c, maybe a E_RRANGE, "max request exceeded".


-Jim




On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:

> Hi
>
> When I upload a file larger than the maxinput I get the Firefox browser page 
> with a "the connection to the server was reset while the page was loading" 
> message. Looking in the access logs it seems to suggest that it doesn't even 
> hit the website as there is no log entry. A file smaller than the maxinput 
> uploads with no problems and everything is correctly logged. Increasing 
> maxinput allows the file to upload and also is everything is correctly logged 
> (so it's not a browser or network issue).
>
> I don't fully understand this - if there is no entry in the access log, does 
> this mean that I'm not even connnecting to AOLserver? As the success of the 
> upload is dependent on maxinput I imagine there is some sort of connection to 
> the server. Assuming there is a connection how can I log it or intercept it?
>
> Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
> the fact that the uploaded file is larger than our limit, and feedback to the 
> user. Even more ideally, I'd like to be able to tell them BEFORE they upload. 
> :-)
>
> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 but 
> also happens on 4.0.10 and on Windows version)
>
> set max_file_upload_mb10
> set max_file_upload_min5
> ns_section ns/server/${server}/module/nssock
>ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# 
> Maximum request time in minutes
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to 
> mailto:lists...@listserv.aol.com>> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
mailto:lists...@listserv.aol.com>> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
mailto:lists...@listserv.aol.com>> with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.






--
AOLserver - http://www.aolserver.com/



To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


--
AOLserver - http://www.aolserver

Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
I think this could work, i.e., dummy up a "runt" or "truncated" connection to 
exercise the rest of the code.   But, it's possible something would go 
uninitialized or assume goodness, i.e., just run off the end of the truncated 
content.  Hmm...

I think today, in 2011, some of the flexibility we imagined back in 1995 isn't 
really so needed.  This includes general purpose logging plugins and network 
drivers when there really is just the common log format, ordinary and SSL 
sockets.  More in the core for the base HTTP processing could make things 
easier to maintain. 

-Jim




On Jun 23, 2011, at 7:27 AM, Dossy Shiobara wrote:

> Alternatively, instead of the driver thread tossing the connection on the 
> floor, it could mark the HTTP request as being truncated in some way, and 
> passing up to maxinput bytes through to the connection thread.  Then, the 
> connection thread can decide how to handle the request -- but, the driver 
> thread still makes sure that the hard limits are enforced on the request that 
> will be passed on to the conn thread ... ?
> 
> 
> On 6/23/11 8:47 AM, Jim Davidson wrote:
>> The reason is the access log is a "trace" that fires at the end of an HTTP 
>> connection and the request isn't a connection until all the content has been 
>> read and the data structures hooked up and passed over to a connection 
>> thread.  In retrospect, transaction logging should be a lower-level built-in 
>> that can deal with logging these aborted transactions.
> 
> -- 
> Dossy Shiobara |  "He realized the fastest way to change
> do...@panoptic.com |   is to laugh at your own folly -- then you
> http://panoptic.com/   |   can let go and quickly move on." (p. 70)
>  * WordPress * jQuery * MySQL * Security * Business Continuity *
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
Howdy,

Appears you need to set driver "debug" mode for the driver for the given socket 
module thing:

ns_section "ns/server/server1/module/nssock"
ns_param debug 1

Hopefully that's not too much muck in the server log.

-Jim


On Jun 23, 2011, at 7:16 AM, Fenton, Brian wrote:

> Thanks Jim
> 
> I should have mentioned that there was nothing in the error log either.
> 
> So, how would you recommend I capture the fact that the uploaded file is 
> larger than our limit, and feedback to the user?
> 
> 
> thanks
> Brian
> 
> 
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 13:47
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
> 
> Hi,
> 
> The short answer is no, there's no access log entry although there may be a 
> server log message buried in the chatter.
> 
> The reason is the access log is a "trace" that fires at the end of an HTTP 
> connection and the request isn't a connection until all the content has been 
> read and the data structures hooked up and passed over to a connection 
> thread.  In retrospect, transaction logging should be a lower-level built-in 
> that can deal with logging these aborted transactions.
> 
> You can see what may be logged in the server log by looking at the 
> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max 
> request exceeded".
> 
> 
> -Jim
> 
> 
> 
> 
> On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:
> 
>> Hi
>> 
>> When I upload a file larger than the maxinput I get the Firefox browser page 
>> with a "the connection to the server was reset while the page was loading" 
>> message. Looking in the access logs it seems to suggest that it doesn't even 
>> hit the website as there is no log entry. A file smaller than the maxinput 
>> uploads with no problems and everything is correctly logged. Increasing 
>> maxinput allows the file to upload and also is everything is correctly 
>> logged (so it's not a browser or network issue).
>> 
>> I don't fully understand this - if there is no entry in the access log, does 
>> this mean that I'm not even connnecting to AOLserver? As the success of the 
>> upload is dependent on maxinput I imagine there is some sort of connection 
>> to the server. Assuming there is a connection how can I log it or intercept 
>> it?
>> 
>> Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
>> the fact that the uploaded file is larger than our limit, and feedback to 
>> the user. Even more ideally, I'd like to be able to tell them BEFORE they 
>> upload. :-)
>> 
>> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 
>> but also happens on 4.0.10 and on Windows version)
>> 
>> set max_file_upload_mb10
>> set max_file_upload_min5
>> ns_section ns/server/${server}/module/nssock
>>   ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] 
>> ;# Maximum File Size for uploads in bytes
>>   ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] 
>> ;# Maximum File Size for uploads in bytes
>>   ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# 
>> Maximum request time in minutes
>> 
>> 
>> --
>> AOLserver - http://www.aolserver.com/
>> 
>> To Remove yourself from this list, simply send an email to 
>>  with the
>> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
>> field of your email blank.
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Majid Khan
I think if its possible in your case use the javascript and calculate the
size of the upload file and return it right away if its  exceeds the limit
this way you dont' need to worry about sending the request to the server,
waiting for a while and ended up with nothing returned.

Regards,

Majid.

On Thu, Jun 23, 2011 at 5:16 PM, Fenton, Brian wrote:

> Thanks Jim
>
> I should have mentioned that there was nothing in the error log either.
>
> So, how would you recommend I capture the fact that the uploaded file is
> larger than our limit, and feedback to the user?
>
>
> thanks
> Brian
>
>
> 
> From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim
> Davidson [jgdavid...@mac.com]
> Sent: 23 June 2011 13:47
> To: AOLSERVER@LISTSERV.AOL.COM
> Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput
>
> Hi,
>
> The short answer is no, there's no access log entry although there may be a
> server log message buried in the chatter.
>
> The reason is the access log is a "trace" that fires at the end of an HTTP
> connection and the request isn't a connection until all the content has been
> read and the data structures hooked up and passed over to a connection
> thread.  In retrospect, transaction logging should be a lower-level built-in
> that can deal with logging these aborted transactions.
>
> You can see what may be logged in the server log by looking at the
> LogReadError function at the end of nsd/driver.c, maybe a E_RRANGE, "max
> request exceeded".
>
>
> -Jim
>
>
>
>
> On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:
>
> > Hi
> >
> > When I upload a file larger than the maxinput I get the Firefox browser
> page with a "the connection to the server was reset while the page was
> loading" message. Looking in the access logs it seems to suggest that it
> doesn't even hit the website as there is no log entry. A file smaller than
> the maxinput uploads with no problems and everything is correctly logged.
> Increasing maxinput allows the file to upload and also is everything is
> correctly logged (so it's not a browser or network issue).
> >
> > I don't fully understand this - if there is no entry in the access log,
> does this mean that I'm not even connnecting to AOLserver? As the success of
> the upload is dependent on maxinput I imagine there is some sort of
> connection to the server. Assuming there is a connection how can I log it or
> intercept it?
> >
> > Can anyone advise me on what to try? Ideally, I'd like to be able to
> capture the fact that the uploaded file is larger than our limit, and
> feedback to the user. Even more ideally, I'd like to be able to tell them
> BEFORE they upload. :-)
> >
> > I've got the following settings in my config.tcl (this is AOLserver 4.5.1
> but also happens on 4.0.10 and on Windows version)
> >
> > set max_file_upload_mb10
> > set max_file_upload_min5
> > ns_section ns/server/${server}/module/nssock
> >ns_param   maxinput   [expr {$max_file_upload_mb * 1024 *
> 1024}] ;# Maximum File Size for uploads in bytes
> >ns_param   maxpost[expr {$max_file_upload_mb * 1024 *
> 1024}] ;# Maximum File Size for uploads in bytes
> >ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;#
> Maximum request time in minutes
> >
> >
> > --
> > AOLserver - http://www.aolserver.com/
> >
> > To Remove yourself from this list, simply send an email to <
> lists...@listserv.aol.com> with the
> > body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <
> lists...@listserv.aol.com> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to <
> lists...@listserv.aol.com> with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the
> Subject: field of your email blank.
>


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Dossy Shiobara
Alternatively, instead of the driver thread tossing the connection on 
the floor, it could mark the HTTP request as being truncated in some 
way, and passing up to maxinput bytes through to the connection thread.  
Then, the connection thread can decide how to handle the request -- but, 
the driver thread still makes sure that the hard limits are enforced on 
the request that will be passed on to the conn thread ... ?



On 6/23/11 8:47 AM, Jim Davidson wrote:

The reason is the access log is a "trace" that fires at the end of an HTTP 
connection and the request isn't a connection until all the content has been read and the 
data structures hooked up and passed over to a connection thread.  In retrospect, 
transaction logging should be a lower-level built-in that can deal with logging these 
aborted transactions.


--
Dossy Shiobara |  "He realized the fastest way to change
do...@panoptic.com |   is to laugh at your own folly -- then you
http://panoptic.com/   |   can let go and quickly move on." (p. 70)
  * WordPress * jQuery * MySQL * Security * Business Continuity *


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Fenton, Brian
Thanks Jim

I should have mentioned that there was nothing in the error log either.

So, how would you recommend I capture the fact that the uploaded file is larger 
than our limit, and feedback to the user?


thanks
Brian



From: AOLserver Discussion [AOLSERVER@LISTSERV.AOL.COM] On Behalf Of Jim 
Davidson [jgdavid...@mac.com]
Sent: 23 June 2011 13:47
To: AOLSERVER@LISTSERV.AOL.COM
Subject: Re: [AOLSERVER] Problem with file uploads larger than maxinput

Hi,

The short answer is no, there's no access log entry although there may be a 
server log message buried in the chatter.

The reason is the access log is a "trace" that fires at the end of an HTTP 
connection and the request isn't a connection until all the content has been 
read and the data structures hooked up and passed over to a connection thread.  
In retrospect, transaction logging should be a lower-level built-in that can 
deal with logging these aborted transactions.

You can see what may be logged in the server log by looking at the LogReadError 
function at the end of nsd/driver.c, maybe a E_RRANGE, "max request exceeded".


-Jim




On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:

> Hi
>
> When I upload a file larger than the maxinput I get the Firefox browser page 
> with a "the connection to the server was reset while the page was loading" 
> message. Looking in the access logs it seems to suggest that it doesn't even 
> hit the website as there is no log entry. A file smaller than the maxinput 
> uploads with no problems and everything is correctly logged. Increasing 
> maxinput allows the file to upload and also is everything is correctly logged 
> (so it's not a browser or network issue).
>
> I don't fully understand this - if there is no entry in the access log, does 
> this mean that I'm not even connnecting to AOLserver? As the success of the 
> upload is dependent on maxinput I imagine there is some sort of connection to 
> the server. Assuming there is a connection how can I log it or intercept it?
>
> Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
> the fact that the uploaded file is larger than our limit, and feedback to the 
> user. Even more ideally, I'd like to be able to tell them BEFORE they upload. 
> :-)
>
> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 but 
> also happens on 4.0.10 and on Windows version)
>
> set max_file_upload_mb10
> set max_file_upload_min5
> ns_section ns/server/${server}/module/nssock
>ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# 
> Maximum request time in minutes
>
>
> --
> AOLserver - http://www.aolserver.com/
>
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Dossy Shiobara
IIRC, in AOLserver 4.5+, until the whole HTTP request is received by the 
server, it's being handled entirely by the driver thread -- and if the 
maxinput ns_limit is exceeded, the driver thread drops the connection 
before it's ever dispatched to a "connection thread" (which might be 
better referred to as a "request handler thread").


I could be wrong, it's been a few years since I looked at that code ... 
but that's what I seem to recall.



On 6/23/11 8:04 AM, Fenton, Brian wrote:

I don't fully understand this - if there is no entry in the access log, does 
this mean that I'm not even connnecting to AOLserver? As the success of the 
upload is dependent on maxinput I imagine there is some sort of connection to 
the server. Assuming there is a connection how can I log it or intercept it?


--
Dossy Shiobara |  "He realized the fastest way to change
do...@panoptic.com |   is to laugh at your own folly -- then you
http://panoptic.com/   |   can let go and quickly move on." (p. 70)
  * WordPress * jQuery * MySQL * Security * Business Continuity *


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


Re: [AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Jim Davidson
Hi,

The short answer is no, there's no access log entry although there may be a 
server log message buried in the chatter.  

The reason is the access log is a "trace" that fires at the end of an HTTP 
connection and the request isn't a connection until all the content has been 
read and the data structures hooked up and passed over to a connection thread.  
In retrospect, transaction logging should be a lower-level built-in that can 
deal with logging these aborted transactions.

You can see what may be logged in the server log by looking at the LogReadError 
function at the end of nsd/driver.c, maybe a E_RRANGE, "max request exceeded".


-Jim




On Jun 23, 2011, at 6:04 AM, Fenton, Brian wrote:

> Hi
> 
> When I upload a file larger than the maxinput I get the Firefox browser page 
> with a "the connection to the server was reset while the page was loading" 
> message. Looking in the access logs it seems to suggest that it doesn't even 
> hit the website as there is no log entry. A file smaller than the maxinput 
> uploads with no problems and everything is correctly logged. Increasing 
> maxinput allows the file to upload and also is everything is correctly logged 
> (so it's not a browser or network issue).
> 
> I don't fully understand this - if there is no entry in the access log, does 
> this mean that I'm not even connnecting to AOLserver? As the success of the 
> upload is dependent on maxinput I imagine there is some sort of connection to 
> the server. Assuming there is a connection how can I log it or intercept it?
> 
> Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
> the fact that the uploaded file is larger than our limit, and feedback to the 
> user. Even more ideally, I'd like to be able to tell them BEFORE they upload. 
> :-)
> 
> I've got the following settings in my config.tcl (this is AOLserver 4.5.1 but 
> also happens on 4.0.10 and on Windows version)
> 
> set max_file_upload_mb10
> set max_file_upload_min5
> ns_section ns/server/${server}/module/nssock
>ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] 
> ;# Maximum File Size for uploads in bytes
>ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# 
> Maximum request time in minutes
> 
> 
> --
> AOLserver - http://www.aolserver.com/
> 
> To Remove yourself from this list, simply send an email to 
>  with the
> body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
> field of your email blank.


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.


[AOLSERVER] Problem with file uploads larger than maxinput

2011-06-23 Thread Fenton, Brian
Hi

When I upload a file larger than the maxinput I get the Firefox browser page 
with a "the connection to the server was reset while the page was loading" 
message. Looking in the access logs it seems to suggest that it doesn't even 
hit the website as there is no log entry. A file smaller than the maxinput 
uploads with no problems and everything is correctly logged. Increasing 
maxinput allows the file to upload and also is everything is correctly logged 
(so it's not a browser or network issue).

I don't fully understand this - if there is no entry in the access log, does 
this mean that I'm not even connnecting to AOLserver? As the success of the 
upload is dependent on maxinput I imagine there is some sort of connection to 
the server. Assuming there is a connection how can I log it or intercept it?

Can anyone advise me on what to try? Ideally, I'd like to be able to capture 
the fact that the uploaded file is larger than our limit, and feedback to the 
user. Even more ideally, I'd like to be able to tell them BEFORE they upload. 
:-)

I've got the following settings in my config.tcl (this is AOLserver 4.5.1 but 
also happens on 4.0.10 and on Windows version)

set max_file_upload_mb10
set max_file_upload_min5
ns_section ns/server/${server}/module/nssock
ns_param   maxinput   [expr {$max_file_upload_mb * 1024 * 1024}] ;# 
Maximum File Size for uploads in bytes
ns_param   maxpost[expr {$max_file_upload_mb * 1024 * 1024}] ;# 
Maximum File Size for uploads in bytes
ns_param   recvwait   [expr {$max_file_upload_min * 60}] ;# Maximum 
request time in minutes


--
AOLserver - http://www.aolserver.com/

To Remove yourself from this list, simply send an email to 
 with the
body of "SIGNOFF AOLSERVER" in the email message. You can leave the Subject: 
field of your email blank.